@eslinted/core 19.0.3-rc.1 → 19.0.3-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/factory/index.d.ts +3250 -5
- package/dist/factory/index.d.ts.map +1 -1
- package/dist/factory/index.js +38 -30
- package/dist/factory/index.js.map +1 -1
- package/dist/scope/registry/index.d.ts +6 -27
- package/dist/scope/registry/index.d.ts.map +1 -1
- package/dist/scope/registry/manifests/css.js +4 -4
- package/dist/scope/registry/manifests/css.js.map +1 -1
- package/dist/scope/registry/manifests/html.d.ts.map +1 -1
- package/dist/scope/registry/manifests/html.js +2 -1
- package/dist/scope/registry/manifests/html.js.map +1 -1
- package/dist/scope/registry/manifests/js.d.ts.map +1 -1
- package/dist/scope/registry/manifests/js.js +6 -2
- package/dist/scope/registry/manifests/js.js.map +1 -1
- package/dist/scope/registry/manifests/json.js +2 -2
- package/dist/scope/registry/manifests/json.js.map +1 -1
- package/dist/scope/registry/manifests/jsonc.d.ts.map +1 -1
- package/dist/scope/registry/manifests/jsonc.js +6 -2
- package/dist/scope/registry/manifests/jsonc.js.map +1 -1
- package/dist/scope/registry/manifests/jsoncc.d.ts.map +1 -1
- package/dist/scope/registry/manifests/jsoncc.js +6 -2
- package/dist/scope/registry/manifests/jsoncc.js.map +1 -1
- package/dist/scope/registry/manifests/mocha.d.ts +1 -11
- package/dist/scope/registry/manifests/mocha.d.ts.map +1 -1
- package/dist/scope/registry/manifests/mocha.js +1 -11
- package/dist/scope/registry/manifests/mocha.js.map +1 -1
- package/dist/scope/registry/manifests/svelte.d.ts +0 -9
- package/dist/scope/registry/manifests/svelte.d.ts.map +1 -1
- package/dist/scope/registry/manifests/svelte.js +0 -10
- package/dist/scope/registry/manifests/svelte.js.map +1 -1
- package/dist/scope/registry/manifests/ts.d.ts +4 -4
- package/dist/scope/registry/manifests/ts.d.ts.map +1 -1
- package/dist/scope/registry/manifests/ts.js +19 -9
- package/dist/scope/registry/manifests/ts.js.map +1 -1
- package/dist/scope/registry/manifests/yml.d.ts +1 -3
- package/dist/scope/registry/manifests/yml.d.ts.map +1 -1
- package/dist/scope/registry/manifests/yml.js +2 -2
- package/dist/scope/registry/manifests/yml.js.map +1 -1
- package/package.json +1 -1
- package/src/factory/index.ts +42 -31
- package/src/interface/output/configs/scoped/settings.d.ts +1 -1
- package/src/scope/registry/manifests/css.ts +4 -4
- package/src/scope/registry/manifests/html.ts +2 -1
- package/src/scope/registry/manifests/js.ts +6 -2
- package/src/scope/registry/manifests/json.ts +2 -2
- package/src/scope/registry/manifests/jsonc.ts +6 -2
- package/src/scope/registry/manifests/jsoncc.ts +6 -2
- package/src/scope/registry/manifests/mocha.ts +1 -11
- package/src/scope/registry/manifests/svelte.ts +0 -10
- package/src/scope/registry/manifests/ts.ts +20 -9
- package/src/scope/registry/manifests/yml.ts +1 -1
package/src/factory/index.ts
CHANGED
@@ -163,19 +163,25 @@ export class Factory<
|
|
163
163
|
languageOptions: {
|
164
164
|
parser = null,
|
165
165
|
globals: global = null,
|
166
|
-
...
|
166
|
+
...extraLanguageOptions
|
167
167
|
},
|
168
168
|
parserOptions: {
|
169
169
|
parser: subparser = null,
|
170
|
-
...
|
170
|
+
...extraParserOptions
|
171
171
|
},
|
172
172
|
processor = null,
|
173
173
|
language = null,
|
174
174
|
} = this.registry[scope];
|
175
175
|
|
176
|
+
function isGlobal(
|
177
|
+
global: string,
|
178
|
+
): global is keyof typeof globals {
|
179
|
+
return global in globals;
|
180
|
+
}
|
181
|
+
|
176
182
|
if (
|
177
183
|
global !== null
|
178
|
-
&& !(global
|
184
|
+
&& !isGlobal(global)
|
179
185
|
)
|
180
186
|
throw new ReferenceError(
|
181
187
|
"Global does not exist",
|
@@ -191,36 +197,41 @@ export class Factory<
|
|
191
197
|
name: `linted/${scope as string}/` as const,
|
192
198
|
files,
|
193
199
|
ignores,
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
200
|
+
...parser === null
|
201
|
+
&& global === null
|
202
|
+
&& subparser === null
|
203
|
+
&& [...Object.keys(extraLanguageOptions)].length === 0
|
204
|
+
&& [...Object.keys(extraParserOptions)].length === 0
|
205
|
+
? {}
|
206
|
+
: {
|
207
|
+
languageOptions: {
|
208
|
+
...extraLanguageOptions,
|
209
|
+
...global === null
|
210
|
+
? {}
|
211
|
+
: {
|
212
|
+
globals: globals[global],
|
213
|
+
},
|
214
|
+
...parser === null
|
215
|
+
? {}
|
216
|
+
: {
|
217
|
+
parser: this.parsers[parser],
|
218
|
+
},
|
219
|
+
...subparser === null
|
220
|
+
&& [...Object.keys(extraParserOptions)].length === 0
|
221
|
+
? {}
|
222
|
+
: {
|
223
|
+
parserOptions: {
|
224
|
+
...extraParserOptions,
|
225
|
+
...subparser === null
|
226
|
+
? {}
|
227
|
+
: {
|
228
|
+
parser: this
|
229
|
+
.parsers[subparser],
|
230
|
+
},
|
220
231
|
},
|
221
|
-
|
232
|
+
},
|
222
233
|
},
|
223
|
-
|
234
|
+
},
|
224
235
|
...processor === null
|
225
236
|
? {}
|
226
237
|
: { processor },
|
@@ -1,9 +1,9 @@
|
|
1
1
|
export const css = {
|
2
2
|
languageOptions: {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
// DOC: https://github.com/ota-meshi/yaml-eslint-parser?tab=readme-ov-file#advanced-configuration
|
3
|
+
// DOC: https://github.com/eslint/css?tab=readme-ov-file#languages
|
4
|
+
tolerant: false /* @default: true | DOC: https://github.com/eslint/css?tab=readme-ov-file#tolerant-mode */,
|
5
|
+
// customSyntax: {} /* DOC: Tailwind: https://github.com/eslint/css?tab=readme-ov-file#configuring-tailwind-syntax | DOC: https://github.com/eslint/css?tab=readme-ov-file#configuring-custom-syntax */,
|
7
6
|
},
|
7
|
+
parserOptions: {},
|
8
8
|
language: "css/css",
|
9
9
|
};
|
@@ -3,7 +3,8 @@ export const html = {
|
|
3
3
|
parser: "html" as const,
|
4
4
|
},
|
5
5
|
parserOptions: {
|
6
|
-
|
6
|
+
// templateEngineSyntax: {} /* DOC: https://html-eslint.org/docs/integrating-template-engine */,
|
7
|
+
frontmatter: true /* @default: false | DOC: https://html-eslint.org/docs/integrating-template-engine#skip-frontmatter */,
|
7
8
|
},
|
8
9
|
language: "@html-eslint/html",
|
9
10
|
};
|
@@ -1,4 +1,8 @@
|
|
1
1
|
export const js = {
|
2
|
-
languageOptions: {
|
3
|
-
|
2
|
+
languageOptions: {
|
3
|
+
// DOC: https://eslint.org/docs/latest/use/configure/language-options
|
4
|
+
},
|
5
|
+
parserOptions: {
|
6
|
+
// DOC: https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options
|
7
|
+
},
|
4
8
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
export const json = {
|
2
2
|
languageOptions: {
|
3
|
-
allowTrailingCommas: true
|
3
|
+
allowTrailingCommas: true /* DOC: https://github.com/eslint/json?tab=readme-ov-file#allowing-trailing-commas-in-jsonc */,
|
4
4
|
},
|
5
5
|
parserOptions: {},
|
6
|
-
language: "json/jsonc"
|
6
|
+
language: "json/jsonc" /* INFO: `languageOptions.allowTrailingCommas` is only available on language `json/jsonc` */,
|
7
7
|
};
|
@@ -3,16 +3,6 @@ export const mocha = {
|
|
3
3
|
globals: "mocha" as const,
|
4
4
|
},
|
5
5
|
parserOptions: {
|
6
|
-
//
|
7
|
-
ecmaFeatures: {
|
8
|
-
jsx: false,
|
9
|
-
globalReturn: true,
|
10
|
-
},
|
11
|
-
jsDocParsingMode: "none" /* @default(project): "all" | @default: "none" | "type-info" */,
|
12
|
-
projectService: true /* DOC: https://typescript-eslint.io/packages/parser/#projectservice , DOC: https://typescript-eslint.io/troubleshooting/typed-linting/#project-service-issues */,
|
13
|
-
// tsconfigRootDir: import.meta.dirname /* DOC: https://typescript-eslint.io/packages/parser/#tsconfigrootdir ; see `DOC:(USE-CASE), I am inferring that an aboslute path is needed ; DOC:(Node.js: import.meta): https://nodejs.org/api/esm.html#importmetadirname */,
|
14
|
-
warnOnUnsupportedTypeScriptVersion: false,
|
15
|
-
sourceType: "module",
|
16
|
-
ecmaVersion: 2023,
|
6
|
+
// Inherits `ts`
|
17
7
|
},
|
18
8
|
};
|
@@ -5,16 +5,6 @@ export const svelte = {
|
|
5
5
|
parserOptions: {
|
6
6
|
parser: "ts" as const,
|
7
7
|
extraFileExtensions: [".svelte"],
|
8
|
-
ecmaFeatures: {
|
9
|
-
jsx: false,
|
10
|
-
globalReturn: true,
|
11
|
-
},
|
12
|
-
jsDocParsingMode: "none" /* @default(project): "all" | @default: "none" | "type-info" */,
|
13
|
-
projectService: true /* DOC: https://typescript-eslint.io/packages/parser/#projectservice , DOC: https://typescript-eslint.io/troubleshooting/typed-linting/#project-service-issues */,
|
14
|
-
// tsconfigRootDir: import.meta.dirname /* DOC: https://typescript-eslint.io/packages/parser/#tsconfigrootdir ; see `DOC:(USE-CASE), I am inferring that an aboslute path is needed ; DOC:(Node.js: import.meta): https://nodejs.org/api/esm.html#importmetadirname */,
|
15
|
-
warnOnUnsupportedTypeScriptVersion: false,
|
16
|
-
sourceType: "module",
|
17
|
-
ecmaVersion: 2023,
|
18
8
|
},
|
19
9
|
processor: "svelte/svelte",
|
20
10
|
};
|
@@ -4,16 +4,27 @@ export const ts = {
|
|
4
4
|
},
|
5
5
|
parserOptions: {
|
6
6
|
// DOC: https://typescript-eslint.io/packages/parser/#configuration
|
7
|
-
//
|
7
|
+
// INFO: `parserOptions.projectService` is the modern replacement for the deprecated `parserOptions.project`:
|
8
|
+
// - https://typescript-eslint.io/blog/project-service/
|
9
|
+
// - https://typescript-eslint.io/getting-started/typed-linting/
|
10
|
+
// - https://typescript-eslint.io/troubleshooting/typed-linting/
|
11
|
+
|
12
|
+
// disallowAutomaticSingleRunInference: false /* @default: false */,
|
13
|
+
// cacheLifetime: { glob: 30 } /* { glob: "Infinity" (never) | number | @default: 30 seconds } */,
|
8
14
|
ecmaFeatures: {
|
9
|
-
jsx: false
|
10
|
-
globalReturn: true
|
15
|
+
// jsx: false /* @default: false */,
|
16
|
+
globalReturn: true /* @default: false */,
|
11
17
|
},
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
+
ecmaVersion: 2023 /* number | @default: latest" */,
|
19
|
+
emitDecoratorMetadata: false /* boolean | @default: undefined (inherits tsconfig, which has @default: false) */,
|
20
|
+
experimentalDecorators: false /* boolean | @default: undefined (inherits tsconfig, which has @default: false) */,
|
21
|
+
// extraFileExtensions: [] /* string[] | @default: [] (none) | BUG: https://typescript-eslint.io/troubleshooting/typed-linting/performance/#changes-to-extrafileextensions-with-projectservice */,
|
22
|
+
isolatedDeclarations: false /* boolean | @default: undefined (inherits tsconfig, which has @default: false) */,
|
23
|
+
// jsDocParsingMode: "all" /* type-info | @default(if `parserOptions.project` is set): all | @default: none */,
|
24
|
+
// jsxFragmentName: null /* string | @default: null | INFO: if `parserOptions.project` is set, this will automatically be detected from the compiler. */,
|
25
|
+
// jsxPragma: "React" /* null | string (e.g. "preact") | @default: "React" | INFO: if `parserOptions.project` is set, this will automatically be detected from the compiler. */,
|
26
|
+
// lib: ["es2018"] /* string[] | @default: ["es2018"] | INFO: if `parserOptions.project` is set, this will automatically be detected from the compiler. */,
|
27
|
+
projectService: true /* ProjectServiceOptions (DOC: https://typescript-eslint.io/packages/parser/#projectserviceoptions) | true | @default: false */,
|
28
|
+
warnOnUnsupportedTypeScriptVersion: false /* preference due to nuisance | @default: true */,
|
18
29
|
},
|
19
30
|
};
|
@@ -4,6 +4,6 @@ export const yml = {
|
|
4
4
|
},
|
5
5
|
parserOptions: {
|
6
6
|
// DOC: https://github.com/ota-meshi/yaml-eslint-parser?tab=readme-ov-file#advanced-configuration
|
7
|
-
defaultYAMLVersion: "1.2" /* @default: "1.2" |
|
7
|
+
// defaultYAMLVersion: "1.2" /* "1.1" | @default: "1.2" | DOC: https://github.com/ota-meshi/yaml-eslint-parser?tab=readme-ov-file#parseroptionsdefaultyamlversion */,
|
8
8
|
},
|
9
9
|
};
|