@eslinted/core 18.1.2 → 18.2.0
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/.github/workflows/RELEASE.yml +36 -36
- package/.github/workflows/rc.yml +36 -36
- package/.markdownlint.jsonc +126 -126
- package/LICENSE +21 -21
- package/README.md +4 -4
- package/SECURITY.md +8 -8
- package/eslint.config.js +3 -3
- package/package.json +96 -91
- package/src/factory/index.ts +141 -141
- package/src/factory/manifests.ts +21 -21
- package/src/factory/scopes/css.ts +17 -17
- package/src/factory/scopes/html.ts +14 -14
- package/src/factory/scopes/js.ts +11 -11
- package/src/factory/scopes/json.ts +11 -11
- package/src/factory/scopes/jsonc.ts +11 -11
- package/src/factory/scopes/manifest/index.ts +16 -16
- package/src/factory/scopes/mocha.ts +24 -24
- package/src/factory/scopes/svelte.ts +24 -24
- package/src/factory/scopes/ts.ts +25 -25
- package/src/factory/scopes/yml.ts +15 -15
- package/src/index.input.spec.ts +150 -150
- package/src/index.spec.ts +51 -51
- package/src/index.ts +24 -24
- package/src/interface/index.ts +3 -3
- package/src/interface/input/imports.ts +12 -12
- package/src/interface/input/index.ts +12 -12
- package/src/interface/input/scopes/defaults.ts +8 -8
- package/src/interface/input/scopes/extensions.ts +18 -18
- package/src/interface/input/scopes/index.ts +2 -2
- package/src/interface/output/configs/global/ignores.ts +6 -6
- package/src/interface/output/configs/global/index.ts +3 -3
- package/src/interface/output/configs/global/plugins.ts +7 -7
- package/src/interface/output/configs/global/settings.ts +7 -7
- package/src/interface/output/configs/index.ts +2 -2
- package/src/interface/output/configs/scoped/index.ts +2 -2
- package/src/interface/output/configs/scoped/rules.ts +8 -8
- package/src/interface/output/configs/scoped/settings.ts +12 -12
- package/src/interface/output/index.ts +9 -9
- package/src/interface/proto/config/index.ts +43 -43
- package/src/interface/proto/config/rule/index.ts +14 -14
- package/src/interface/proto/config/utility/index.ts +25 -25
- package/src/interface/proto/index.ts +1 -1
- package/src/scope/index.spec.ts +43 -43
- package/src/scope/index.ts +13 -13
- package/src/scope/tree/index.spec.ts +48 -48
- package/src/scope/tree/index.ts +8 -8
- package/src/scope/types/index.ts +24 -24
- package/tsconfig.json +165 -165
package/package.json
CHANGED
@@ -1,91 +1,96 @@
|
|
1
|
-
{
|
2
|
-
"$
|
3
|
-
"$schema": "https://json.schemastore.org/package",
|
4
|
-
"$help": "https://docs.npmjs.com/cli/configuring-npm/package-json",
|
5
|
-
"name": "@eslinted/core",
|
6
|
-
"version": "18.
|
7
|
-
"description": "Internal core for npm package `linted`, responsible for producing an array of fully-formed ESLint configurations according to `linted` spec.",
|
8
|
-
"repository": "github:jimmy-zhening-luo/linted-core",
|
9
|
-
"license": "MIT",
|
10
|
-
"private": false,
|
11
|
-
"engineStrict": true,
|
12
|
-
"engines": {
|
13
|
-
"node": ">=22.14.0 <23",
|
14
|
-
"npm": ">=11.2.0 <12"
|
15
|
-
},
|
16
|
-
"peerDependenciesMeta": {},
|
17
|
-
"dependencies": {
|
18
|
-
"globals": "^16.0.0"
|
19
|
-
},
|
20
|
-
"devDependencies": {
|
21
|
-
"@types/chai": "^5.2.0",
|
22
|
-
"@types/mocha": "^10.0.10",
|
23
|
-
"@types/node": "^22.13.11",
|
24
|
-
"chai": "^5.2.0",
|
25
|
-
"mocha": "^11.1.0",
|
26
|
-
"npm-run-all": "^4.1.5",
|
27
|
-
"run-script-os": "^1.1.6",
|
28
|
-
"ts-add-js-extension": "^1.6.5",
|
29
|
-
"typescript": "^5.8.2"
|
30
|
-
},
|
31
|
-
"type": "module",
|
32
|
-
"main": "dist/index.js",
|
33
|
-
"types": "dist/index.d.ts",
|
34
|
-
"config": {
|
35
|
-
"language": "ts",
|
36
|
-
"rewrite": "true",
|
37
|
-
"lint": "false"
|
38
|
-
},
|
39
|
-
"scripts": {
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
43
|
-
"
|
44
|
-
"
|
45
|
-
"
|
46
|
-
"
|
47
|
-
"
|
48
|
-
"
|
49
|
-
"
|
50
|
-
"
|
51
|
-
"
|
52
|
-
"
|
53
|
-
"
|
54
|
-
"
|
55
|
-
"
|
56
|
-
"
|
57
|
-
"
|
58
|
-
"
|
59
|
-
"
|
60
|
-
"
|
61
|
-
"
|
62
|
-
"
|
63
|
-
"lint
|
64
|
-
"
|
65
|
-
"
|
66
|
-
"
|
67
|
-
"
|
68
|
-
"test
|
69
|
-
"test
|
70
|
-
"test
|
71
|
-
"
|
72
|
-
"
|
73
|
-
"start
|
74
|
-
"start:
|
75
|
-
"start
|
76
|
-
"start
|
77
|
-
"
|
78
|
-
"
|
79
|
-
"
|
80
|
-
|
81
|
-
|
82
|
-
"
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
},
|
89
|
-
"
|
90
|
-
|
91
|
-
|
1
|
+
{
|
2
|
+
"$template": "2214.0.0",
|
3
|
+
"$schema": "https://json.schemastore.org/package",
|
4
|
+
"$help": "https://docs.npmjs.com/cli/configuring-npm/package-json",
|
5
|
+
"name": "@eslinted/core",
|
6
|
+
"version": "18.2.0",
|
7
|
+
"description": "Internal core for npm package `linted`, responsible for producing an array of fully-formed ESLint configurations according to `linted` spec.",
|
8
|
+
"repository": "github:jimmy-zhening-luo/linted-core",
|
9
|
+
"license": "MIT",
|
10
|
+
"private": false,
|
11
|
+
"engineStrict": true,
|
12
|
+
"engines": {
|
13
|
+
"node": ">=22.14.0 <23",
|
14
|
+
"npm": ">=11.2.0 <12"
|
15
|
+
},
|
16
|
+
"peerDependenciesMeta": {},
|
17
|
+
"dependencies": {
|
18
|
+
"globals": "^16.0.0"
|
19
|
+
},
|
20
|
+
"devDependencies": {
|
21
|
+
"@types/chai": "^5.2.0",
|
22
|
+
"@types/mocha": "^10.0.10",
|
23
|
+
"@types/node": "^22.13.11",
|
24
|
+
"chai": "^5.2.0",
|
25
|
+
"mocha": "^11.1.0",
|
26
|
+
"npm-run-all": "^4.1.5",
|
27
|
+
"run-script-os": "^1.1.6",
|
28
|
+
"ts-add-js-extension": "^1.6.5",
|
29
|
+
"typescript": "^5.8.2"
|
30
|
+
},
|
31
|
+
"type": "module",
|
32
|
+
"main": "dist/index.js",
|
33
|
+
"types": "dist/index.d.ts",
|
34
|
+
"config": {
|
35
|
+
"language": "ts",
|
36
|
+
"rewrite": "true",
|
37
|
+
"lint": "false"
|
38
|
+
},
|
39
|
+
"scripts": {
|
40
|
+
"clean": "run-os",
|
41
|
+
"clean:windows": "npm run clean:lang:%npm_package_config_language%:windows",
|
42
|
+
"clean:default": "npm run clean:lang:$npm_package_config_language:default",
|
43
|
+
"clean:lang:ts:windows": "cmd /c if exist dist rmdir /s /q dist",
|
44
|
+
"clean:lang:ts:default": "rm -rf dist",
|
45
|
+
"clean:lang:svelte:windows": "cmd /c \"(if exist build rmdir /s /q build) & (if exist .svelte-kit rmdir /s /q .svelte-kit)\"",
|
46
|
+
"clean:lang:svelte:default": "rm -rf build .svelte-kit",
|
47
|
+
"clean:lint": "run-os",
|
48
|
+
"clean:lint:windows": "cmd /c if exist .eslintcache del /f /q .eslintcache",
|
49
|
+
"clean:lint:default": "rm -f .eslintcache",
|
50
|
+
"prebuild": "npm run clean",
|
51
|
+
"build": "run-os",
|
52
|
+
"build:windows": "run-s build:lang:%npm_package_config_language%:* postbuild:lint:required:%npm_package_config_lint%",
|
53
|
+
"build:default": "run-s build:lang:$npm_package_config_language:* postbuild:lint:required:$npm_package_config_lint",
|
54
|
+
"build:lang:ts:compile": "tsc",
|
55
|
+
"build:lang:ts:rewrite": "run-os",
|
56
|
+
"build:lang:ts:rewrite:windows": "npm run --if-present build:lang:ts:rewrite:do:%npm_package_config_rewrite%",
|
57
|
+
"build:lang:ts:rewrite:default": "npm run --if-present build:lang:ts:rewrite:do:$npm_package_config_rewrite",
|
58
|
+
"build:lang:ts:rewrite:do:true": "ts-add-js-extension --dir=dist",
|
59
|
+
"build:lang:svelte:sync": "svelte-kit sync",
|
60
|
+
"build:lang:svelte:check": "svelte-check --tsconfig ./tsconfig.json",
|
61
|
+
"build:lang:svelte:compile": "vite build",
|
62
|
+
"postbuild": "echo \"Build complete.\"",
|
63
|
+
"postbuild:lint:required:true": "npm run lint",
|
64
|
+
"postbuild:lint:required:false": "(npm run lint) || (echo \"Linting (optional) skipped. Continuing...\")",
|
65
|
+
"lint": "eslint --cache --fix \"{,src/**/,tests/**/,static/**/,typings/**/,public/**/,tools/**/,.github/**/,.vscode/**/}*.{js,cjs,mjs,ts,cts,mts,svelte,html,css,json,jsonc,code-snippets,yml,yaml}\"",
|
66
|
+
"lint:clean": "npm run clean:lint && npm run lint",
|
67
|
+
"pretest": "npm run build",
|
68
|
+
"test": "run-os",
|
69
|
+
"test:default": "npm run --if-present test:lang:$npm_package_config_language",
|
70
|
+
"test:windows": "npm run --if-present test:lang:%npm_package_config_language%",
|
71
|
+
"test:lang:ts": "mocha",
|
72
|
+
"prestart": "npm test",
|
73
|
+
"start": "run-os",
|
74
|
+
"start:default": "npm run start:lang:$npm_package_config_language",
|
75
|
+
"start:windows": "npm run start:lang:%npm_package_config_language%",
|
76
|
+
"start:lang:ts": "node .",
|
77
|
+
"start:lang:svelte": "vite preview --open",
|
78
|
+
"prepublishOnly": "npm test",
|
79
|
+
"postpublish": "run-os",
|
80
|
+
"postpublish:default": "if [ \"${npm_package_version#*-}\" = \"${npm_package_version}\" ]; then npm dist-tag add \"$npm_package_name@$npm_package_version\" latest; fi",
|
81
|
+
"postpublish:windows": "cmd /c for /f \"delims=-\" %a in (\"%npm_package_version%\") do if \"%a\" == \"%npm_package_version%\" npm dist-tag add \"%npm_package_name%@%npm_package_version%\" latest",
|
82
|
+
"predeploy": "npm test",
|
83
|
+
"deploy": ""
|
84
|
+
},
|
85
|
+
"publishConfig": {
|
86
|
+
"access": "public",
|
87
|
+
"tag": "next"
|
88
|
+
},
|
89
|
+
"mocha": {
|
90
|
+
"spec": [
|
91
|
+
"dist/**/*.spec.js"
|
92
|
+
]
|
93
|
+
},
|
94
|
+
"keywords": [],
|
95
|
+
"author": "Jimmy Zhening Luo <jimmy-zhening-luo@users.noreply.github.com> (https://jimm.my/)"
|
96
|
+
}
|
package/src/factory/index.ts
CHANGED
@@ -1,141 +1,141 @@
|
|
1
|
-
import globals from "globals";
|
2
|
-
import { ScopeManifests } from "./manifests";
|
3
|
-
import type { Input } from "../interface";
|
4
|
-
import type { tree as Tree } from "../scope";
|
5
|
-
|
6
|
-
export class Factory {
|
7
|
-
public readonly global;
|
8
|
-
public readonly scopes;
|
9
|
-
|
10
|
-
constructor(
|
11
|
-
tree: typeof Tree,
|
12
|
-
public readonly parsers: Input["imports"]["parsers"],
|
13
|
-
defaults: Input["defaults"],
|
14
|
-
{
|
15
|
-
"*": globalExtension = {},
|
16
|
-
...scopeExtensions
|
17
|
-
}: Input["extensions"] = {} as const,
|
18
|
-
) {
|
19
|
-
const {
|
20
|
-
noInlineConfig = defaults.settings.noInlineConfig,
|
21
|
-
reportUnusedDisableDirectives = defaults.settings.reportUnusedDisableDirectives,
|
22
|
-
sourceType = defaults.settings.sourceType,
|
23
|
-
ecmaVersion = defaults.settings.ecmaVersion,
|
24
|
-
ignores = [],
|
25
|
-
override = false,
|
26
|
-
} = globalExtension;
|
27
|
-
|
28
|
-
this.global = {
|
29
|
-
settings: {
|
30
|
-
name: "linted/*/settings/",
|
31
|
-
linterOptions: { noInlineConfig, reportUnusedDisableDirectives } as const,
|
32
|
-
languageOptions: { sourceType, ecmaVersion } as const,
|
33
|
-
} as const,
|
34
|
-
ignores: {
|
35
|
-
name: "linted/*/ignores/",
|
36
|
-
ignores: [
|
37
|
-
...override ? [] : defaults.ignores["*"],
|
38
|
-
...ignores,
|
39
|
-
] as const,
|
40
|
-
} as const,
|
41
|
-
} as const;
|
42
|
-
this.scopes = {
|
43
|
-
files: defaults.files,
|
44
|
-
ignores: defaults.ignores,
|
45
|
-
rules: defaults.rules,
|
46
|
-
} as const;
|
47
|
-
|
48
|
-
for (const scope in scopeExtensions) {
|
49
|
-
const {
|
50
|
-
[scope as keyof typeof scopeExtensions]: {
|
51
|
-
files: userFiles = [],
|
52
|
-
ignores: userIgnores = [],
|
53
|
-
rules: userRules = null,
|
54
|
-
} = {} as const,
|
55
|
-
} = scopeExtensions;
|
56
|
-
|
57
|
-
this.scopes.files[scope as keyof typeof scopeExtensions].push(...userFiles);
|
58
|
-
this.scopes.ignores[scope as keyof typeof scopeExtensions].push(...userIgnores);
|
59
|
-
|
60
|
-
if (userRules !== null)
|
61
|
-
this.scopes.rules[scope as keyof typeof scopeExtensions].push({ id: `${scope}/override`, rules: userRules } as const);
|
62
|
-
}
|
63
|
-
|
64
|
-
for (const [scope, parents] of tree)
|
65
|
-
for (const parent of parents) {
|
66
|
-
this.scopes.files[parent].push(
|
67
|
-
...this.scopes.files[scope],
|
68
|
-
);
|
69
|
-
this.scopes.ignores[parent].push(
|
70
|
-
...this.scopes.ignores[scope],
|
71
|
-
);
|
72
|
-
}
|
73
|
-
}
|
74
|
-
|
75
|
-
public get globals() {
|
76
|
-
const {
|
77
|
-
settings,
|
78
|
-
ignores,
|
79
|
-
} = this.global;
|
80
|
-
|
81
|
-
return [
|
82
|
-
settings,
|
83
|
-
ignores,
|
84
|
-
] as const;
|
85
|
-
}
|
86
|
-
|
87
|
-
public scope<S extends keyof typeof ScopeManifests>(scope: S) {
|
88
|
-
const {
|
89
|
-
files: { [scope]: files },
|
90
|
-
ignores: { [scope]: ignores },
|
91
|
-
rules: { [scope]: rules },
|
92
|
-
} = this.scopes,
|
93
|
-
ruleset = rules.map(({ id, rules }) => ({ id: `${scope}/${id}`, rules } as const)),
|
94
|
-
{
|
95
|
-
languageOptions: {
|
96
|
-
parser = null,
|
97
|
-
globals: global = null,
|
98
|
-
...languageOptionsStatic
|
99
|
-
},
|
100
|
-
parserOptions: {
|
101
|
-
parser: subparser = null,
|
102
|
-
...parserOptionsStatic
|
103
|
-
},
|
104
|
-
processor,
|
105
|
-
language,
|
106
|
-
} = new ScopeManifests[scope]();
|
107
|
-
|
108
|
-
return files.length === 0
|
109
|
-
? [] as const
|
110
|
-
: ruleset.length === 0
|
111
|
-
? [] as const
|
112
|
-
: [
|
113
|
-
{
|
114
|
-
name: `linted/${scope}/`,
|
115
|
-
files,
|
116
|
-
ignores,
|
117
|
-
languageOptions: {
|
118
|
-
...languageOptionsStatic,
|
119
|
-
...global !== null && global in globals ? { globals: globals[global as keyof typeof globals] } as const : {} as const,
|
120
|
-
...parser === null ? {} as const : { parser: this.parsers[parser] } as const,
|
121
|
-
...Object.keys(parserOptionsStatic).length < 1 && subparser === null
|
122
|
-
? {} as const
|
123
|
-
: {
|
124
|
-
parserOptions: {
|
125
|
-
...parserOptionsStatic,
|
126
|
-
...subparser === null ? {} as const : { parser: this.parsers[subparser] } as const,
|
127
|
-
} as const,
|
128
|
-
} as const,
|
129
|
-
} as const,
|
130
|
-
...processor,
|
131
|
-
...language,
|
132
|
-
} as const,
|
133
|
-
...ruleset.map(({ id, rules }) => ({
|
134
|
-
name: `linted/${id}/`,
|
135
|
-
files,
|
136
|
-
ignores,
|
137
|
-
rules,
|
138
|
-
} as const)),
|
139
|
-
];
|
140
|
-
}
|
141
|
-
}
|
1
|
+
import globals from "globals";
|
2
|
+
import { ScopeManifests } from "./manifests";
|
3
|
+
import type { Input } from "../interface";
|
4
|
+
import type { tree as Tree } from "../scope";
|
5
|
+
|
6
|
+
export class Factory {
|
7
|
+
public readonly global;
|
8
|
+
public readonly scopes;
|
9
|
+
|
10
|
+
constructor(
|
11
|
+
tree: typeof Tree,
|
12
|
+
public readonly parsers: Input["imports"]["parsers"],
|
13
|
+
defaults: Input["defaults"],
|
14
|
+
{
|
15
|
+
"*": globalExtension = {},
|
16
|
+
...scopeExtensions
|
17
|
+
}: Input["extensions"] = {} as const,
|
18
|
+
) {
|
19
|
+
const {
|
20
|
+
noInlineConfig = defaults.settings.noInlineConfig,
|
21
|
+
reportUnusedDisableDirectives = defaults.settings.reportUnusedDisableDirectives,
|
22
|
+
sourceType = defaults.settings.sourceType,
|
23
|
+
ecmaVersion = defaults.settings.ecmaVersion,
|
24
|
+
ignores = [],
|
25
|
+
override = false,
|
26
|
+
} = globalExtension;
|
27
|
+
|
28
|
+
this.global = {
|
29
|
+
settings: {
|
30
|
+
name: "linted/*/settings/",
|
31
|
+
linterOptions: { noInlineConfig, reportUnusedDisableDirectives } as const,
|
32
|
+
languageOptions: { sourceType, ecmaVersion } as const,
|
33
|
+
} as const,
|
34
|
+
ignores: {
|
35
|
+
name: "linted/*/ignores/",
|
36
|
+
ignores: [
|
37
|
+
...override ? [] : defaults.ignores["*"],
|
38
|
+
...ignores,
|
39
|
+
] as const,
|
40
|
+
} as const,
|
41
|
+
} as const;
|
42
|
+
this.scopes = {
|
43
|
+
files: defaults.files,
|
44
|
+
ignores: defaults.ignores,
|
45
|
+
rules: defaults.rules,
|
46
|
+
} as const;
|
47
|
+
|
48
|
+
for (const scope in scopeExtensions) {
|
49
|
+
const {
|
50
|
+
[scope as keyof typeof scopeExtensions]: {
|
51
|
+
files: userFiles = [],
|
52
|
+
ignores: userIgnores = [],
|
53
|
+
rules: userRules = null,
|
54
|
+
} = {} as const,
|
55
|
+
} = scopeExtensions;
|
56
|
+
|
57
|
+
this.scopes.files[scope as keyof typeof scopeExtensions].push(...userFiles);
|
58
|
+
this.scopes.ignores[scope as keyof typeof scopeExtensions].push(...userIgnores);
|
59
|
+
|
60
|
+
if (userRules !== null)
|
61
|
+
this.scopes.rules[scope as keyof typeof scopeExtensions].push({ id: `${scope}/override`, rules: userRules } as const);
|
62
|
+
}
|
63
|
+
|
64
|
+
for (const [scope, parents] of tree)
|
65
|
+
for (const parent of parents) {
|
66
|
+
this.scopes.files[parent].push(
|
67
|
+
...this.scopes.files[scope],
|
68
|
+
);
|
69
|
+
this.scopes.ignores[parent].push(
|
70
|
+
...this.scopes.ignores[scope],
|
71
|
+
);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
|
75
|
+
public get globals() {
|
76
|
+
const {
|
77
|
+
settings,
|
78
|
+
ignores,
|
79
|
+
} = this.global;
|
80
|
+
|
81
|
+
return [
|
82
|
+
settings,
|
83
|
+
ignores,
|
84
|
+
] as const;
|
85
|
+
}
|
86
|
+
|
87
|
+
public scope<S extends keyof typeof ScopeManifests>(scope: S) {
|
88
|
+
const {
|
89
|
+
files: { [scope]: files },
|
90
|
+
ignores: { [scope]: ignores },
|
91
|
+
rules: { [scope]: rules },
|
92
|
+
} = this.scopes,
|
93
|
+
ruleset = rules.map(({ id, rules }) => ({ id: `${scope}/${id}`, rules } as const)),
|
94
|
+
{
|
95
|
+
languageOptions: {
|
96
|
+
parser = null,
|
97
|
+
globals: global = null,
|
98
|
+
...languageOptionsStatic
|
99
|
+
},
|
100
|
+
parserOptions: {
|
101
|
+
parser: subparser = null,
|
102
|
+
...parserOptionsStatic
|
103
|
+
},
|
104
|
+
processor,
|
105
|
+
language,
|
106
|
+
} = new ScopeManifests[scope]();
|
107
|
+
|
108
|
+
return files.length === 0
|
109
|
+
? [] as const
|
110
|
+
: ruleset.length === 0
|
111
|
+
? [] as const
|
112
|
+
: [
|
113
|
+
{
|
114
|
+
name: `linted/${scope}/`,
|
115
|
+
files,
|
116
|
+
ignores,
|
117
|
+
languageOptions: {
|
118
|
+
...languageOptionsStatic,
|
119
|
+
...global !== null && global in globals ? { globals: globals[global as keyof typeof globals] } as const : {} as const,
|
120
|
+
...parser === null ? {} as const : { parser: this.parsers[parser] } as const,
|
121
|
+
...Object.keys(parserOptionsStatic).length < 1 && subparser === null
|
122
|
+
? {} as const
|
123
|
+
: {
|
124
|
+
parserOptions: {
|
125
|
+
...parserOptionsStatic,
|
126
|
+
...subparser === null ? {} as const : { parser: this.parsers[subparser] } as const,
|
127
|
+
} as const,
|
128
|
+
} as const,
|
129
|
+
} as const,
|
130
|
+
...processor,
|
131
|
+
...language,
|
132
|
+
} as const,
|
133
|
+
...ruleset.map(({ id, rules }) => ({
|
134
|
+
name: `linted/${id}/`,
|
135
|
+
files,
|
136
|
+
ignores,
|
137
|
+
rules,
|
138
|
+
} as const)),
|
139
|
+
];
|
140
|
+
}
|
141
|
+
}
|
package/src/factory/manifests.ts
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
import js from "./scopes/js";
|
2
|
-
import ts from "./scopes/ts";
|
3
|
-
import mocha from "./scopes/mocha";
|
4
|
-
import svelte from "./scopes/svelte";
|
5
|
-
import html from "./scopes/html";
|
6
|
-
import css from "./scopes/css";
|
7
|
-
import json from "./scopes/json";
|
8
|
-
import jsonc from "./scopes/jsonc";
|
9
|
-
import yml from "./scopes/yml";
|
10
|
-
|
11
|
-
export const ScopeManifests = {
|
12
|
-
js,
|
13
|
-
ts,
|
14
|
-
mocha,
|
15
|
-
svelte,
|
16
|
-
html,
|
17
|
-
css,
|
18
|
-
json,
|
19
|
-
jsonc,
|
20
|
-
yml,
|
21
|
-
} as const;
|
1
|
+
import js from "./scopes/js";
|
2
|
+
import ts from "./scopes/ts";
|
3
|
+
import mocha from "./scopes/mocha";
|
4
|
+
import svelte from "./scopes/svelte";
|
5
|
+
import html from "./scopes/html";
|
6
|
+
import css from "./scopes/css";
|
7
|
+
import json from "./scopes/json";
|
8
|
+
import jsonc from "./scopes/jsonc";
|
9
|
+
import yml from "./scopes/yml";
|
10
|
+
|
11
|
+
export const ScopeManifests = {
|
12
|
+
js,
|
13
|
+
ts,
|
14
|
+
mocha,
|
15
|
+
svelte,
|
16
|
+
html,
|
17
|
+
css,
|
18
|
+
json,
|
19
|
+
jsonc,
|
20
|
+
yml,
|
21
|
+
} as const;
|
@@ -1,17 +1,17 @@
|
|
1
|
-
import { ScopeManifest } from "./manifest";
|
2
|
-
|
3
|
-
export default class CssManifest extends ScopeManifest {
|
4
|
-
public readonly languageOptions = {
|
5
|
-
parser: null,
|
6
|
-
globals: null,
|
7
|
-
tolerant: false,
|
8
|
-
} as const;
|
9
|
-
public readonly parserOptions = {
|
10
|
-
/* DOC: https://github.com/ota-meshi/yaml-eslint-parser?tab=readme-ov-file#advanced-configuration */
|
11
|
-
parser: null,
|
12
|
-
} as const;
|
13
|
-
public readonly processor = {} as const;
|
14
|
-
public readonly language = {
|
15
|
-
language: "css/css",
|
16
|
-
} as const;
|
17
|
-
}
|
1
|
+
import { ScopeManifest } from "./manifest";
|
2
|
+
|
3
|
+
export default class CssManifest extends ScopeManifest {
|
4
|
+
public readonly languageOptions = {
|
5
|
+
parser: null,
|
6
|
+
globals: null,
|
7
|
+
tolerant: false,
|
8
|
+
} as const;
|
9
|
+
public readonly parserOptions = {
|
10
|
+
/* DOC: https://github.com/ota-meshi/yaml-eslint-parser?tab=readme-ov-file#advanced-configuration */
|
11
|
+
parser: null,
|
12
|
+
} as const;
|
13
|
+
public readonly processor = {} as const;
|
14
|
+
public readonly language = {
|
15
|
+
language: "css/css",
|
16
|
+
} as const;
|
17
|
+
}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import { ScopeManifest } from "./manifest";
|
2
|
-
|
3
|
-
export default class HtmlManifest extends ScopeManifest<"html"> {
|
4
|
-
public readonly languageOptions = {
|
5
|
-
parser: "html",
|
6
|
-
globals: null,
|
7
|
-
} as const;
|
8
|
-
public readonly parserOptions = {
|
9
|
-
parser: null,
|
10
|
-
frontmatter: true /* DOC: https://github.com/yeonjuan/html-eslint/issues/291#issuecomment-2726307803 */,
|
11
|
-
} as const;
|
12
|
-
public readonly processor = {} as const;
|
13
|
-
public readonly language = {} as const;
|
14
|
-
}
|
1
|
+
import { ScopeManifest } from "./manifest";
|
2
|
+
|
3
|
+
export default class HtmlManifest extends ScopeManifest<"html"> {
|
4
|
+
public readonly languageOptions = {
|
5
|
+
parser: "html",
|
6
|
+
globals: null,
|
7
|
+
} as const;
|
8
|
+
public readonly parserOptions = {
|
9
|
+
parser: null,
|
10
|
+
frontmatter: true /* DOC: https://github.com/yeonjuan/html-eslint/issues/291#issuecomment-2726307803 */,
|
11
|
+
} as const;
|
12
|
+
public readonly processor = {} as const;
|
13
|
+
public readonly language = {} as const;
|
14
|
+
}
|
package/src/factory/scopes/js.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
import { ScopeManifest } from "./manifest";
|
2
|
-
|
3
|
-
export default class JsManifest extends ScopeManifest {
|
4
|
-
public readonly languageOptions = {
|
5
|
-
parser: null,
|
6
|
-
globals: null,
|
7
|
-
} as const;
|
8
|
-
public readonly parserOptions = { parser: null } as const;
|
9
|
-
public readonly processor = {} as const;
|
10
|
-
public readonly language = {} as const;
|
11
|
-
}
|
1
|
+
import { ScopeManifest } from "./manifest";
|
2
|
+
|
3
|
+
export default class JsManifest extends ScopeManifest {
|
4
|
+
public readonly languageOptions = {
|
5
|
+
parser: null,
|
6
|
+
globals: null,
|
7
|
+
} as const;
|
8
|
+
public readonly parserOptions = { parser: null } as const;
|
9
|
+
public readonly processor = {} as const;
|
10
|
+
public readonly language = {} as const;
|
11
|
+
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import { ScopeManifest } from "./manifest";
|
2
|
-
|
3
|
-
export default class JsonManifest extends ScopeManifest<"jsonc"> {
|
4
|
-
public readonly languageOptions = {
|
5
|
-
parser: "jsonc",
|
6
|
-
globals: null,
|
7
|
-
} as const;
|
8
|
-
public readonly parserOptions = { parser: null } as const;
|
9
|
-
public readonly processor = {} as const;
|
10
|
-
public readonly language = {} as const;
|
11
|
-
}
|
1
|
+
import { ScopeManifest } from "./manifest";
|
2
|
+
|
3
|
+
export default class JsonManifest extends ScopeManifest<"jsonc"> {
|
4
|
+
public readonly languageOptions = {
|
5
|
+
parser: "jsonc",
|
6
|
+
globals: null,
|
7
|
+
} as const;
|
8
|
+
public readonly parserOptions = { parser: null } as const;
|
9
|
+
public readonly processor = {} as const;
|
10
|
+
public readonly language = {} as const;
|
11
|
+
}
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import { ScopeManifest } from "./manifest";
|
2
|
-
|
3
|
-
export default class JsoncManifest extends ScopeManifest {
|
4
|
-
public readonly languageOptions = {
|
5
|
-
parser: null,
|
6
|
-
globals: null,
|
7
|
-
} as const;
|
8
|
-
public readonly parserOptions = { parser: null } as const;
|
9
|
-
public readonly processor = {} as const;
|
10
|
-
public readonly language = {} as const;
|
11
|
-
}
|
1
|
+
import { ScopeManifest } from "./manifest";
|
2
|
+
|
3
|
+
export default class JsoncManifest extends ScopeManifest {
|
4
|
+
public readonly languageOptions = {
|
5
|
+
parser: null,
|
6
|
+
globals: null,
|
7
|
+
} as const;
|
8
|
+
public readonly parserOptions = { parser: null } as const;
|
9
|
+
public readonly processor = {} as const;
|
10
|
+
public readonly language = {} as const;
|
11
|
+
}
|