|
16 | 16 | * specific language governing permissions and limitations |
17 | 17 | * under the License. |
18 | 18 | */ |
19 | | -import parser from "@typescript-eslint/parser"; |
20 | | -import validator from "eslint-plugin-es-spec"; |
21 | | -import { defineConfig } from "eslint/config"; |
| 19 | +import parser from '@typescript-eslint/parser' |
| 20 | +import validator from 'eslint-plugin-es-spec' |
| 21 | +import { defineConfig } from 'eslint/config' |
22 | 22 |
|
23 | 23 | export default defineConfig({ |
24 | | - files: ["**/*.ts"], |
| 24 | + files: ['**/*.ts'], |
25 | 25 | languageOptions: { |
26 | 26 | parser, |
27 | 27 | parserOptions: { |
28 | 28 | projectService: true, |
29 | | - tsconfigRootDir: import.meta.dirname, |
30 | | - }, |
| 29 | + tsconfigRootDir: import.meta.dirname |
| 30 | + } |
31 | 31 | }, |
32 | | - plugins: { "es-spec-validator": validator }, |
| 32 | + plugins: { 'es-spec-validator': validator }, |
33 | 33 | rules: { |
34 | | - "es-spec-validator/single-key-dictionary-key-is-string": "error", |
35 | | - "es-spec-validator/dictionary-key-is-string": "error", |
36 | | - "es-spec-validator/no-native-types": "error", |
37 | | - "es-spec-validator/invalid-node-types": "error", |
38 | | - "es-spec-validator/no-generic-number": "error", |
39 | | - "es-spec-validator/request-must-have-urls": "error", |
40 | | - "es-spec-validator/no-variants-on-responses": "error", |
41 | | - "es-spec-validator/no-inline-unions": "error", |
42 | | - "es-spec-validator/prefer-tagged-variants": "error", |
43 | | - "es-spec-validator/no-duplicate-type-names": [ |
44 | | - "error", |
| 34 | + 'es-spec-validator/single-key-dictionary-key-is-string': 'error', |
| 35 | + 'es-spec-validator/dictionary-key-is-string': 'error', |
| 36 | + 'es-spec-validator/no-native-types': 'error', |
| 37 | + 'es-spec-validator/invalid-node-types': 'error', |
| 38 | + 'es-spec-validator/no-generic-number': 'error', |
| 39 | + 'es-spec-validator/request-must-have-urls': 'error', |
| 40 | + 'es-spec-validator/no-variants-on-responses': 'error', |
| 41 | + 'es-spec-validator/no-inline-unions': 'error', |
| 42 | + 'es-spec-validator/prefer-tagged-variants': 'error', |
| 43 | + 'es-spec-validator/no-duplicate-type-names': [ |
| 44 | + 'error', |
45 | 45 | { |
46 | | - ignoreNames: ["Request", "Response", "ResponseBase"], |
| 46 | + ignoreNames: ['Request', 'Response', 'ResponseBase'], |
47 | 47 | existingDuplicates: { |
48 | 48 | Action: [ |
49 | | - "indices.modify_data_stream", |
50 | | - "indices.update_aliases", |
51 | | - "watcher._types", |
| 49 | + 'indices.modify_data_stream', |
| 50 | + 'indices.update_aliases', |
| 51 | + 'watcher._types' |
52 | 52 | ], |
53 | | - Actions: ["ilm._types", "security.put_privileges", "watcher._types"], |
54 | | - ComponentTemplate: ["cat.component_templates", "cluster._types"], |
| 53 | + Actions: ['ilm._types', 'security.put_privileges', 'watcher._types'], |
| 54 | + ComponentTemplate: ['cat.component_templates', 'cluster._types'], |
55 | 55 | Context: [ |
56 | | - "_global.get_script_context", |
57 | | - "_global.search._types", |
58 | | - "nodes._types", |
| 56 | + '_global.get_script_context', |
| 57 | + '_global.search._types', |
| 58 | + 'nodes._types' |
59 | 59 | ], |
60 | 60 | DatabaseConfigurationMetadata: [ |
61 | | - "ingest.get_geoip_database", |
62 | | - "ingest.get_ip_location_database", |
| 61 | + 'ingest.get_geoip_database', |
| 62 | + 'ingest.get_ip_location_database' |
63 | 63 | ], |
64 | | - Datafeed: ["ml._types", "xpack.usage"], |
65 | | - Destination: ["_global.reindex", "transform._types"], |
66 | | - Feature: ["features._types", "indices.get", "xpack.info"], |
67 | | - Features: ["indices.get", "xpack.info"], |
68 | | - Filter: ["_global.termvectors", "ml._types"], |
69 | | - IndexingPressure: ["cluster.stats", "indices._types", "nodes._types"], |
70 | | - IndexingPressureMemory: ["indices._types", "nodes._types"], |
71 | | - Ingest: ["ingest._types", "nodes._types"], |
| 64 | + Datafeed: ['ml._types', 'xpack.usage'], |
| 65 | + Destination: ['_global.reindex', 'transform._types'], |
| 66 | + Feature: ['features._types', 'indices.get', 'xpack.info'], |
| 67 | + Features: ['indices.get', 'xpack.info'], |
| 68 | + Filter: ['_global.termvectors', 'ml._types'], |
| 69 | + IndexingPressure: ['cluster.stats', 'indices._types', 'nodes._types'], |
| 70 | + IndexingPressureMemory: ['indices._types', 'nodes._types'], |
| 71 | + Ingest: ['ingest._types', 'nodes._types'], |
72 | 72 | MigrationFeature: [ |
73 | | - "migration.get_feature_upgrade_status", |
74 | | - "migration.post_feature_upgrade", |
| 73 | + 'migration.get_feature_upgrade_status', |
| 74 | + 'migration.post_feature_upgrade' |
75 | 75 | ], |
76 | | - Operation: ["_global.mget", "_global.mtermvectors"], |
77 | | - ResponseBody: ["_global.search", "ml.evaluate_data_frame"], |
78 | | - Phase: ["ilm._types", "xpack.usage"], |
79 | | - Phases: ["ilm._types", "xpack.usage"], |
80 | | - Pipeline: ["ingest._types", "logstash._types"], |
81 | | - Policy: ["enrich._types", "ilm._types", "slm._types"], |
82 | | - RequestItem: ["_global.msearch", "_global.msearch_template"], |
83 | | - ResponseItem: ["_global.bulk", "_global.mget", "_global.msearch"], |
84 | | - RoleMapping: ["security._types", "xpack.usage"], |
85 | | - RuntimeFieldTypes: ["cluster.stats", "xpack.usage"], |
86 | | - ShardsStats: ["indices.field_usage_stats", "snapshot._types"], |
87 | | - ShardStats: ["ccr._types", "indices.stats"], |
88 | | - Source: ["_global.reindex", "transform._types"], |
| 76 | + Operation: ['_global.mget', '_global.mtermvectors'], |
| 77 | + ResponseBody: ['_global.search', 'ml.evaluate_data_frame'], |
| 78 | + Phase: ['ilm._types', 'xpack.usage'], |
| 79 | + Phases: ['ilm._types', 'xpack.usage'], |
| 80 | + Pipeline: ['ingest._types', 'logstash._types'], |
| 81 | + Policy: ['enrich._types', 'ilm._types', 'slm._types'], |
| 82 | + RequestItem: ['_global.msearch', '_global.msearch_template'], |
| 83 | + ResponseItem: ['_global.bulk', '_global.mget', '_global.msearch'], |
| 84 | + RoleMapping: ['security._types', 'xpack.usage'], |
| 85 | + RuntimeFieldTypes: ['cluster.stats', 'xpack.usage'], |
| 86 | + ShardsStats: ['indices.field_usage_stats', 'snapshot._types'], |
| 87 | + ShardStats: ['ccr._types', 'indices.stats'], |
| 88 | + Source: ['_global.reindex', 'transform._types'], |
89 | 89 | Token: [ |
90 | | - "_global.termvectors", |
91 | | - "security.authenticate", |
92 | | - "security.create_service_token", |
93 | | - "security.enroll_kibana", |
94 | | - ], |
95 | | - }, |
96 | | - }, |
| 90 | + '_global.termvectors', |
| 91 | + 'security.authenticate', |
| 92 | + 'security.create_service_token', |
| 93 | + 'security.enroll_kibana' |
| 94 | + ] |
| 95 | + } |
| 96 | + } |
97 | 97 | ], |
98 | | - "es-spec-validator/no-all-string-literal-unions": "error", |
99 | | - "es-spec-validator/jsdoc-endpoint-check": "error", |
100 | | - }, |
101 | | -}); |
| 98 | + 'es-spec-validator/no-all-string-literal-unions': 'error', |
| 99 | + 'es-spec-validator/jsdoc-endpoint-check': 'error' |
| 100 | + } |
| 101 | +}) |
0 commit comments