@eslinted/core 8.0.0 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/workflows/RELEASE.yml +36 -36
- package/.github/workflows/rc.yml +36 -36
- package/.markdownlint.jsonc +122 -122
- package/LICENSE +21 -21
- package/README.md +5 -5
- package/SECURITY.md +9 -9
- package/eslint.config.js +3 -3
- package/package.json +96 -96
- package/src/factory/files.ts +26 -26
- package/src/factory/index.ts +27 -27
- package/src/factory/options/html.ts +18 -18
- package/src/factory/options/index.ts +21 -21
- package/src/factory/options/js.ts +13 -13
- package/src/factory/options/json.ts +18 -18
- package/src/factory/options/jsonc.ts +18 -18
- package/src/factory/options/mocha.ts +28 -28
- package/src/factory/options/option/index.ts +91 -91
- package/src/factory/options/option/template/globals.ts +5 -5
- package/src/factory/options/option/template/index.ts +26 -26
- package/src/factory/options/option/template/language/ecma.ts +3 -3
- package/src/factory/options/option/template/language/index.ts +21 -21
- package/src/factory/options/option/template/language/source.ts +4 -4
- package/src/factory/options/option/template/linter.ts +8 -8
- package/src/factory/options/option/template/plugins.ts +1 -1
- package/src/factory/options/svelte.ts +32 -32
- package/src/factory/options/ts.ts +24 -24
- package/src/factory/options/yml.ts +18 -18
- package/src/factory/rulesets/index.ts +24 -24
- package/src/factory/rulesets/ruleset.ts +25 -25
- package/src/index.ts +77 -77
- package/src/input/files.ts +6 -6
- package/src/input/imports/parsers.ts +10 -10
- package/src/input/imports/plugins.ts +9 -9
- package/src/input/index.ts +23 -23
- package/src/input/parsers.ts +3 -3
- package/src/input/plugins.ts +3 -3
- package/src/input/rules/entry/index.ts +7 -7
- package/src/input/rules/entry/record/index.ts +3 -3
- package/src/input/rules/entry/record/state.ts +5 -5
- package/src/input/rules/index.ts +14 -14
- package/src/output.ts +24 -24
- package/src/scopes.spec.ts +37 -37
- package/src/scopes.ts +11 -11
- package/tsconfig.json +163 -163
- package/typings/common/literals/number/bases/base32.d.ts +19 -19
- package/typings/common/literals/number/bases/base64.d.ts +35 -35
- package/typings/common/literals/number/bases/binary.d.ts +4 -4
- package/typings/common/literals/number/bases/decimal.d.ts +5 -5
- package/typings/common/literals/number/bases/hex.d.ts +10 -10
- package/typings/common/literals/number/bases/octal.d.ts +7 -7
- package/typings/common/literals/number/bases/quatral.d.ts +4 -4
- package/typings/common/literals/number/bases/ternary.d.ts +4 -4
- package/typings/common/literals/string/letter/digit/extended/base64/index.d.ts +13 -13
- package/typings/common/literals/string/letter/digit/extended/hex/index.d.ts +9 -9
- package/typings/common/literals/string/letter/digit/index.d.ts +12 -12
- package/typings/common/literals/string/letter/index.d.ts +35 -35
- package/typings/common/primitive/index.d.ts +5 -5
- package/typings/common/safe/index.d.ts +2 -2
- package/typings/common/safe/numbers/finite/index.d.ts +2 -2
- package/typings/common/safe/numbers/fint.d.ts +1 -1
- package/typings/common/safe/numbers/integer/index.d.ts +2 -2
- package/typings/common/safe/numbers/integer/numberful/index.d.ts +1 -1
- package/typings/common/safe/numbers/polarity/negative.d.ts +4 -4
- package/typings/common/safe/numbers/polarity/pole/index.d.ts +18 -18
- package/typings/common/safe/numbers/polarity/positive.d.ts +4 -4
- package/typings/common/safe/strings/char.d.ts +1 -1
- package/typings/common/safe/strings/stringful/index.d.ts +1 -1
- package/typings/common/safe/strings/stringful/length/index.d.ts +3 -3
- package/typings/common/utility/interface/build/particord/index.d.ts +1 -1
- package/typings/common/utility/interface/build/properties/Field.d.ts +1 -1
- package/typings/common/utility/interface/build/properties/Flag.d.ts +1 -1
- package/typings/common/utility/interface/build/properties/Limit.d.ts +8 -8
- package/typings/common/utility/interface/build/properties/List.d.ts +1 -1
- package/typings/common/utility/interface/build/properties/Listish.d.ts +1 -1
- package/typings/common/utility/interface/build/properties/Scalar.d.ts +1 -1
- package/typings/common/utility/interface/build/properties/property/index.d.ts +8 -8
- package/typings/common/utility/interface/build/recordful/index.d.ts +5 -5
- package/typings/common/utility/interface/build/tables/FieldTable.d.ts +1 -1
- package/typings/common/utility/interface/build/tables/FlagTable.d.ts +1 -1
- package/typings/common/utility/interface/build/tables/ListTable.d.ts +1 -1
- package/typings/common/utility/interface/build/tables/ListishTable.d.ts +1 -1
- package/typings/common/utility/interface/build/tables/ScalarTable.d.ts +1 -1
- package/typings/common/utility/interface/build/tables/table/index.d.ts +3 -3
- package/typings/common/utility/interface/identity/interface/index.d.ts +80 -80
- package/typings/common/utility/interface/identity/keys/index.d.ts +71 -71
- package/typings/common/utility/interface/transform/partial/unrequire/index.d.ts +45 -45
- package/typings/common/utility/iterable/build/arrays/array/index.d.ts +11 -11
- package/typings/common/utility/iterable/build/arrays/index.d.ts +2 -2
- package/typings/common/utility/iterable/build/tuples/index.d.ts +10 -10
- package/typings/common/utility/iterable/build/tuples/tuple/index.d.ts +26 -26
- package/typings/common/utility/iterable/identity/array/index.d.ts +65 -65
- package/typings/common/utility/iterable/identity/array/length/index.d.ts +16 -16
- package/typings/common/utility/iterable/identity/dyad.d.ts +3 -3
- package/typings/common/utility/iterable/identity/monad.d.ts +48 -48
- package/typings/common/utility/iterable/identity/triad.d.ts +3 -3
- package/typings/common/utility/iterable/transform/flat/index.d.ts +3 -3
- package/typings/common/utility/iterable/transform/flat/unflat/index.d.ts +3 -3
- package/typings/common/utility/iterable/transform/string/index.d.ts +30 -30
- package/typings/common/utility/iterable/transform/string/stringify/index.d.ts +27 -27
- package/typings/common/utility/nullable/index.d.ts +1 -1
- package/typings/common/utility/nullable/index.spec.d.ts +13 -13
- package/typings/common/utility/nullable/null/index.d.ts +1 -1
- package/typings/common/utility/nullable/null/index.spec.d.ts +13 -13
- package/typings/common/utility/object/build/index.d.ts +3 -3
- package/typings/common/utility/primitive/boolean/true/index.d.ts +30 -30
- package/typings/common/utility/primitive/index.d.ts +42 -42
- package/typings/common/utility/primitive/number/length/index.d.ts +35 -35
- package/typings/common/utility/primitive/number/length/numbered/index.d.ts +35 -35
- package/typings/common/utility/primitive/string/fake/index.d.ts +1 -1
- package/typings/common/utility/primitive/string/literalful/index.d.ts +28 -28
- package/typings/common/utility/primitive/string/literalful/literal/index.d.ts +22 -22
- package/typings/common/utility/test.d.ts +2 -2
- package/typings/common/valid/index.d.ts +7 -7
- package/typings/common/valid/string/index.d.ts +1 -1
package/package.json
CHANGED
@@ -1,96 +1,96 @@
|
|
1
|
-
{
|
2
|
-
"_schemaVersion": "22.10.2-rc.0",
|
3
|
-
"name": "@eslinted/core",
|
4
|
-
"version": "
|
5
|
-
"description": "Core ESLint flat config factory npm package `linted`.",
|
6
|
-
"keywords": [],
|
7
|
-
"repository": "github:jimmy-zhening-luo/linted-core",
|
8
|
-
"homepage": "https://github.com/jimmy-zhening-luo/linted-core#readme",
|
9
|
-
"bugs": "https://github.com/jimmy-zhening-luo/linted-core/issues",
|
10
|
-
"license": "MIT",
|
11
|
-
"private": false,
|
12
|
-
"publishConfig": {
|
13
|
-
"access": "public",
|
14
|
-
"tag": "next"
|
15
|
-
},
|
16
|
-
"type": "module",
|
17
|
-
"main": "dist/index.js",
|
18
|
-
"types": "dist/index.d.ts",
|
19
|
-
"config": {
|
20
|
-
"language": "ts",
|
21
|
-
"fix": "true",
|
22
|
-
"lint": "false"
|
23
|
-
},
|
24
|
-
"engineStrict": true,
|
25
|
-
"engines": {
|
26
|
-
"node": ">=22.10.0",
|
27
|
-
"npm": ">=10.9.0"
|
28
|
-
},
|
29
|
-
"peerDependenciesMeta": {},
|
30
|
-
"dependencies": {
|
31
|
-
"globals": "^15.11.0"
|
32
|
-
},
|
33
|
-
"devDependencies": {
|
34
|
-
"@types/chai": "^5.0.1",
|
35
|
-
"@types/mocha": "^10.0.9",
|
36
|
-
"chai": "^5.1.2",
|
37
|
-
"mocha": "^10.8.2",
|
38
|
-
"npm-run-all": "^4.1.5",
|
39
|
-
"run-script-os": "^1.1.6",
|
40
|
-
"ts-add-js-extension": "^1.6.4",
|
41
|
-
"typescript": "^5.6.3"
|
42
|
-
},
|
43
|
-
"scripts": {
|
44
|
-
"build": "run-os",
|
45
|
-
"build:default": "npm run rebuild -- $npm_package_config_language $npm_package_config_fix $npm_package_config_lint default",
|
46
|
-
"build:windows": "npm run rebuild -- %npm_package_config_language% %npm_package_config_fix% %npm_package_config_lint% windows",
|
47
|
-
"rebuild": "run-s \"clean:{1}:{4}\" \"compile:{1}:*\" \"fix:{2} -- {1}\" \"lint:{3}\" \"test:{1}\" --",
|
48
|
-
"clean:ts:default": "rm -rf dist",
|
49
|
-
"clean:ts:windows": "cmd /c if exist dist rmdir /s /q dist",
|
50
|
-
"clean:svelte:default": "rm -rf build .svelte-kit",
|
51
|
-
"clean:svelte:windows": "run-s clean:svelte:windows:*",
|
52
|
-
"clean:svelte:windows:build": "cmd /c if exist build rmdir /s /q build",
|
53
|
-
"clean:svelte:windows:kit": "cmd /c if exist .svelte-kit rmdir /s /q .svelte-kit",
|
54
|
-
"compile:ts:compile": "tsc",
|
55
|
-
"compile:svelte:sync": "svelte-kit sync",
|
56
|
-
"compile:svelte:check": "svelte-check --tsconfig ./tsconfig.json",
|
57
|
-
"compile:svelte:compile": "vite build",
|
58
|
-
"fix:true": "run-s \"fix:dist:{1}\" --",
|
59
|
-
"fix:false": "echo \"Fix skipped (fix=false)\"",
|
60
|
-
"fix:dist:ts": "ts-add-js-extension --dir=dist",
|
61
|
-
"fix:dist:svelte": "echo \"Fix skipped for Svelte (handled by SvelteKit)\"",
|
62
|
-
"li": "eslint --cache --fix",
|
63
|
-
"lint": "npm run build",
|
64
|
-
"lint:true": "run-os",
|
65
|
-
"lint:true:default": "run-s lint:scope:global:* \"lint:scope:$npm_package_config_language\"",
|
66
|
-
"lint:true:windows": "run-s lint:scope:global:* \"lint:scope:%npm_package_config_language%\"",
|
67
|
-
"lint:false": "(npm run lint:true) || (echo \"Skipped linting (lint=false)\")",
|
68
|
-
"lint:scope:global:configs": "npm run li -- {*,.github/**/*}.{json,jsonc,yml,yaml,js,cjs,mjs,ts,cts,mts}",
|
69
|
-
"lint:scope:global:code": "npm run li -- {src,tests,static,typings}/**/*.{html,js,cjs,mjs,ts,cts,mts}",
|
70
|
-
"lint:scope:ts": "exit 0",
|
71
|
-
"lint:scope:svelte": "npm run li -- {src,tests,static}/**/*.svelte",
|
72
|
-
"postbuild": "echo \"Build (+lint) complete.\"",
|
73
|
-
"pretest": "npm run build",
|
74
|
-
"test": "",
|
75
|
-
"test:ts": "mocha",
|
76
|
-
"test:svelte": "",
|
77
|
-
"start": "run-os",
|
78
|
-
"start:default": "npm run starter:$npm_package_config_language",
|
79
|
-
"start:windows": "npm run starter:%npm_package_config_language%",
|
80
|
-
"starter:ts": "node .",
|
81
|
-
"starter:svelte": "vite preview",
|
82
|
-
"prestart": "npm test",
|
83
|
-
"prepublishOnly": "npm test",
|
84
|
-
"postpublish": "run-os",
|
85
|
-
"postpublish:default": "if [ \"${npm_package_version#*-}\" = \"${npm_package_version}\" ]; then npm dist-tag add \"$npm_package_name@$npm_package_version\" latest; fi",
|
86
|
-
"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",
|
87
|
-
"predeploy": "npm test",
|
88
|
-
"deploy": ""
|
89
|
-
},
|
90
|
-
"mocha": {
|
91
|
-
"spec": [
|
92
|
-
"dist/**/*.spec.js"
|
93
|
-
]
|
94
|
-
},
|
95
|
-
"author": "Jimmy Zhening Luo <1450044+jimmy-zhening-luo@users.noreply.github.com> (https://jimm.my/)"
|
96
|
-
}
|
1
|
+
{
|
2
|
+
"_schemaVersion": "22.10.2-rc.0",
|
3
|
+
"name": "@eslinted/core",
|
4
|
+
"version": "9.0.0",
|
5
|
+
"description": "Core ESLint flat config factory npm package `linted`.",
|
6
|
+
"keywords": [],
|
7
|
+
"repository": "github:jimmy-zhening-luo/linted-core",
|
8
|
+
"homepage": "https://github.com/jimmy-zhening-luo/linted-core#readme",
|
9
|
+
"bugs": "https://github.com/jimmy-zhening-luo/linted-core/issues",
|
10
|
+
"license": "MIT",
|
11
|
+
"private": false,
|
12
|
+
"publishConfig": {
|
13
|
+
"access": "public",
|
14
|
+
"tag": "next"
|
15
|
+
},
|
16
|
+
"type": "module",
|
17
|
+
"main": "dist/index.js",
|
18
|
+
"types": "dist/index.d.ts",
|
19
|
+
"config": {
|
20
|
+
"language": "ts",
|
21
|
+
"fix": "true",
|
22
|
+
"lint": "false"
|
23
|
+
},
|
24
|
+
"engineStrict": true,
|
25
|
+
"engines": {
|
26
|
+
"node": ">=22.10.0",
|
27
|
+
"npm": ">=10.9.0"
|
28
|
+
},
|
29
|
+
"peerDependenciesMeta": {},
|
30
|
+
"dependencies": {
|
31
|
+
"globals": "^15.11.0"
|
32
|
+
},
|
33
|
+
"devDependencies": {
|
34
|
+
"@types/chai": "^5.0.1",
|
35
|
+
"@types/mocha": "^10.0.9",
|
36
|
+
"chai": "^5.1.2",
|
37
|
+
"mocha": "^10.8.2",
|
38
|
+
"npm-run-all": "^4.1.5",
|
39
|
+
"run-script-os": "^1.1.6",
|
40
|
+
"ts-add-js-extension": "^1.6.4",
|
41
|
+
"typescript": "^5.6.3"
|
42
|
+
},
|
43
|
+
"scripts": {
|
44
|
+
"build": "run-os",
|
45
|
+
"build:default": "npm run rebuild -- $npm_package_config_language $npm_package_config_fix $npm_package_config_lint default",
|
46
|
+
"build:windows": "npm run rebuild -- %npm_package_config_language% %npm_package_config_fix% %npm_package_config_lint% windows",
|
47
|
+
"rebuild": "run-s \"clean:{1}:{4}\" \"compile:{1}:*\" \"fix:{2} -- {1}\" \"lint:{3}\" \"test:{1}\" --",
|
48
|
+
"clean:ts:default": "rm -rf dist",
|
49
|
+
"clean:ts:windows": "cmd /c if exist dist rmdir /s /q dist",
|
50
|
+
"clean:svelte:default": "rm -rf build .svelte-kit",
|
51
|
+
"clean:svelte:windows": "run-s clean:svelte:windows:*",
|
52
|
+
"clean:svelte:windows:build": "cmd /c if exist build rmdir /s /q build",
|
53
|
+
"clean:svelte:windows:kit": "cmd /c if exist .svelte-kit rmdir /s /q .svelte-kit",
|
54
|
+
"compile:ts:compile": "tsc",
|
55
|
+
"compile:svelte:sync": "svelte-kit sync",
|
56
|
+
"compile:svelte:check": "svelte-check --tsconfig ./tsconfig.json",
|
57
|
+
"compile:svelte:compile": "vite build",
|
58
|
+
"fix:true": "run-s \"fix:dist:{1}\" --",
|
59
|
+
"fix:false": "echo \"Fix skipped (fix=false)\"",
|
60
|
+
"fix:dist:ts": "ts-add-js-extension --dir=dist",
|
61
|
+
"fix:dist:svelte": "echo \"Fix skipped for Svelte (handled by SvelteKit)\"",
|
62
|
+
"li": "eslint --cache --fix",
|
63
|
+
"lint": "npm run build",
|
64
|
+
"lint:true": "run-os",
|
65
|
+
"lint:true:default": "run-s lint:scope:global:* \"lint:scope:$npm_package_config_language\"",
|
66
|
+
"lint:true:windows": "run-s lint:scope:global:* \"lint:scope:%npm_package_config_language%\"",
|
67
|
+
"lint:false": "(npm run lint:true) || (echo \"Skipped linting (lint=false)\")",
|
68
|
+
"lint:scope:global:configs": "npm run li -- {*,.github/**/*}.{json,jsonc,yml,yaml,js,cjs,mjs,ts,cts,mts}",
|
69
|
+
"lint:scope:global:code": "npm run li -- {src,tests,static,typings}/**/*.{html,js,cjs,mjs,ts,cts,mts}",
|
70
|
+
"lint:scope:ts": "exit 0",
|
71
|
+
"lint:scope:svelte": "npm run li -- {src,tests,static}/**/*.svelte",
|
72
|
+
"postbuild": "echo \"Build (+lint) complete.\"",
|
73
|
+
"pretest": "npm run build",
|
74
|
+
"test": "",
|
75
|
+
"test:ts": "mocha",
|
76
|
+
"test:svelte": "",
|
77
|
+
"start": "run-os",
|
78
|
+
"start:default": "npm run starter:$npm_package_config_language",
|
79
|
+
"start:windows": "npm run starter:%npm_package_config_language%",
|
80
|
+
"starter:ts": "node .",
|
81
|
+
"starter:svelte": "vite preview",
|
82
|
+
"prestart": "npm test",
|
83
|
+
"prepublishOnly": "npm test",
|
84
|
+
"postpublish": "run-os",
|
85
|
+
"postpublish:default": "if [ \"${npm_package_version#*-}\" = \"${npm_package_version}\" ]; then npm dist-tag add \"$npm_package_name@$npm_package_version\" latest; fi",
|
86
|
+
"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",
|
87
|
+
"predeploy": "npm test",
|
88
|
+
"deploy": ""
|
89
|
+
},
|
90
|
+
"mocha": {
|
91
|
+
"spec": [
|
92
|
+
"dist/**/*.spec.js"
|
93
|
+
]
|
94
|
+
},
|
95
|
+
"author": "Jimmy Zhening Luo <1450044+jimmy-zhening-luo@users.noreply.github.com> (https://jimm.my/)"
|
96
|
+
}
|
package/src/factory/files.ts
CHANGED
@@ -1,26 +1,26 @@
|
|
1
|
-
import type { Input } from ".";
|
2
|
-
|
3
|
-
export class Files {
|
4
|
-
private readonly _files = new Map<string, string[]>();
|
5
|
-
|
6
|
-
constructor(files: Input["files"]) {
|
7
|
-
const { files: base, includes } = files,
|
8
|
-
scopes = Object.keys(base) as (keyof typeof base)[];
|
9
|
-
|
10
|
-
for (const scope of scopes)
|
11
|
-
this._files.set(
|
12
|
-
scope,
|
13
|
-
[
|
14
|
-
...base[scope],
|
15
|
-
...scope in includes ? (includes[scope] as string[]) : [],
|
16
|
-
],
|
17
|
-
);
|
18
|
-
}
|
19
|
-
|
20
|
-
public files(scope: string) {
|
21
|
-
if (!this._files.has(scope))
|
22
|
-
throw new ReferenceError(`Files not found for scope: ${scope}`);
|
23
|
-
|
24
|
-
return this._files.get(scope) as string[];
|
25
|
-
}
|
26
|
-
}
|
1
|
+
import type { Input } from ".";
|
2
|
+
|
3
|
+
export class Files {
|
4
|
+
private readonly _files = new Map<string, string[]>();
|
5
|
+
|
6
|
+
constructor(files: Input["files"]) {
|
7
|
+
const { files: base, includes } = files,
|
8
|
+
scopes = Object.keys(base) as (keyof typeof base)[];
|
9
|
+
|
10
|
+
for (const scope of scopes)
|
11
|
+
this._files.set(
|
12
|
+
scope,
|
13
|
+
[
|
14
|
+
...base[scope],
|
15
|
+
...scope in includes ? (includes[scope] as string[]) : [],
|
16
|
+
],
|
17
|
+
);
|
18
|
+
}
|
19
|
+
|
20
|
+
public files(scope: string) {
|
21
|
+
if (!this._files.has(scope))
|
22
|
+
throw new ReferenceError(`Files not found for scope: ${scope}`);
|
23
|
+
|
24
|
+
return this._files.get(scope) as string[];
|
25
|
+
}
|
26
|
+
}
|
package/src/factory/index.ts
CHANGED
@@ -1,27 +1,27 @@
|
|
1
|
-
export type { Scope, Input, Output } from "..";
|
2
|
-
|
3
|
-
import type { Input } from "..";
|
4
|
-
import { Files } from "./files";
|
5
|
-
import { Rulesets } from "./rulesets";
|
6
|
-
import Options from "./options";
|
7
|
-
|
8
|
-
export { Options };
|
9
|
-
export class Factory {
|
10
|
-
public readonly files: Files;
|
11
|
-
public readonly rulesets: Rulesets;
|
12
|
-
|
13
|
-
constructor(
|
14
|
-
files: Input["files"],
|
15
|
-
rules: Input["rules"],
|
16
|
-
) {
|
17
|
-
this.files = new Files(files);
|
18
|
-
this.rulesets = new Rulesets(rules);
|
19
|
-
}
|
20
|
-
|
21
|
-
public produce(scope: string) {
|
22
|
-
return [
|
23
|
-
this.files.files(scope),
|
24
|
-
this.rulesets.ruleset(scope),
|
25
|
-
] as const;
|
26
|
-
}
|
27
|
-
}
|
1
|
+
export type { Scope, Input, Output } from "..";
|
2
|
+
|
3
|
+
import type { Input } from "..";
|
4
|
+
import { Files } from "./files";
|
5
|
+
import { Rulesets } from "./rulesets";
|
6
|
+
import Options from "./options";
|
7
|
+
|
8
|
+
export { Options };
|
9
|
+
export class Factory {
|
10
|
+
public readonly files: Files;
|
11
|
+
public readonly rulesets: Rulesets;
|
12
|
+
|
13
|
+
constructor(
|
14
|
+
files: Input["files"],
|
15
|
+
rules: Input["rules"],
|
16
|
+
) {
|
17
|
+
this.files = new Files(files);
|
18
|
+
this.rulesets = new Rulesets(rules);
|
19
|
+
}
|
20
|
+
|
21
|
+
public produce(scope: string) {
|
22
|
+
return [
|
23
|
+
this.files.files(scope),
|
24
|
+
this.rulesets.ruleset(scope),
|
25
|
+
] as const;
|
26
|
+
}
|
27
|
+
}
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import Option from "./option";
|
2
|
-
|
3
|
-
export default class Html extends Option<
|
4
|
-
"html",
|
5
|
-
"@html-eslint",
|
6
|
-
false,
|
7
|
-
true,
|
8
|
-
1
|
9
|
-
> {
|
10
|
-
public readonly scope = "html";
|
11
|
-
public readonly processor = {} as const;
|
12
|
-
|
13
|
-
public get languageOptions() {
|
14
|
-
const [parser] = this.parser;
|
15
|
-
|
16
|
-
return { parser } as const;
|
17
|
-
}
|
18
|
-
}
|
1
|
+
import Option from "./option";
|
2
|
+
|
3
|
+
export default class Html extends Option<
|
4
|
+
"html",
|
5
|
+
"@html-eslint",
|
6
|
+
false,
|
7
|
+
true,
|
8
|
+
1
|
9
|
+
> {
|
10
|
+
public readonly scope = "html";
|
11
|
+
public readonly processor = {} as const;
|
12
|
+
|
13
|
+
public get languageOptions() {
|
14
|
+
const [parser] = this.parser;
|
15
|
+
|
16
|
+
return { parser } as const;
|
17
|
+
}
|
18
|
+
}
|
@@ -1,21 +1,21 @@
|
|
1
|
-
export type { Scope, Input, Output } from "..";
|
2
|
-
|
3
|
-
import js from "./js";
|
4
|
-
import ts from "./ts";
|
5
|
-
import svelte from "./svelte";
|
6
|
-
import mocha from "./mocha";
|
7
|
-
import html from "./html";
|
8
|
-
import json from "./json";
|
9
|
-
import jsonc from "./jsonc";
|
10
|
-
import yml from "./yml";
|
11
|
-
|
12
|
-
export default {
|
13
|
-
js,
|
14
|
-
ts,
|
15
|
-
svelte,
|
16
|
-
mocha,
|
17
|
-
html,
|
18
|
-
json,
|
19
|
-
jsonc,
|
20
|
-
yml,
|
21
|
-
} as const;
|
1
|
+
export type { Scope, Input, Output } from "..";
|
2
|
+
|
3
|
+
import js from "./js";
|
4
|
+
import ts from "./ts";
|
5
|
+
import svelte from "./svelte";
|
6
|
+
import mocha from "./mocha";
|
7
|
+
import html from "./html";
|
8
|
+
import json from "./json";
|
9
|
+
import jsonc from "./jsonc";
|
10
|
+
import yml from "./yml";
|
11
|
+
|
12
|
+
export default {
|
13
|
+
js,
|
14
|
+
ts,
|
15
|
+
svelte,
|
16
|
+
mocha,
|
17
|
+
html,
|
18
|
+
json,
|
19
|
+
jsonc,
|
20
|
+
yml,
|
21
|
+
} as const;
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import Option from "./option";
|
2
|
-
|
3
|
-
export default class Js extends Option<"js", "@stylistic"> {
|
4
|
-
public readonly scope = "js";
|
5
|
-
public readonly processor = {};
|
6
|
-
|
7
|
-
public get languageOptions() {
|
8
|
-
return {
|
9
|
-
ecmaVersion: "latest",
|
10
|
-
sourceType: "module",
|
11
|
-
} as const;
|
12
|
-
}
|
13
|
-
}
|
1
|
+
import Option from "./option";
|
2
|
+
|
3
|
+
export default class Js extends Option<"js", "@stylistic"> {
|
4
|
+
public readonly scope = "js";
|
5
|
+
public readonly processor = {};
|
6
|
+
|
7
|
+
public get languageOptions() {
|
8
|
+
return {
|
9
|
+
ecmaVersion: "latest",
|
10
|
+
sourceType: "module",
|
11
|
+
} as const;
|
12
|
+
}
|
13
|
+
}
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import Option from "./option";
|
2
|
-
|
3
|
-
export default class Json extends Option<
|
4
|
-
"json",
|
5
|
-
"jsonc",
|
6
|
-
false,
|
7
|
-
true,
|
8
|
-
1
|
9
|
-
> {
|
10
|
-
public readonly scope = "json";
|
11
|
-
public readonly processor = {} as const;
|
12
|
-
|
13
|
-
public get languageOptions() {
|
14
|
-
const [parser] = this.parser;
|
15
|
-
|
16
|
-
return { parser } as const;
|
17
|
-
}
|
18
|
-
}
|
1
|
+
import Option from "./option";
|
2
|
+
|
3
|
+
export default class Json extends Option<
|
4
|
+
"json",
|
5
|
+
"jsonc",
|
6
|
+
false,
|
7
|
+
true,
|
8
|
+
1
|
9
|
+
> {
|
10
|
+
public readonly scope = "json";
|
11
|
+
public readonly processor = {} as const;
|
12
|
+
|
13
|
+
public get languageOptions() {
|
14
|
+
const [parser] = this.parser;
|
15
|
+
|
16
|
+
return { parser } as const;
|
17
|
+
}
|
18
|
+
}
|
@@ -1,18 +1,18 @@
|
|
1
|
-
import Option from "./option";
|
2
|
-
|
3
|
-
export default class Jsonc extends Option<
|
4
|
-
"jsonc",
|
5
|
-
"jsonc",
|
6
|
-
false,
|
7
|
-
true,
|
8
|
-
1
|
9
|
-
> {
|
10
|
-
public readonly scope = "jsonc";
|
11
|
-
public readonly processor = {} as const;
|
12
|
-
|
13
|
-
public get languageOptions() {
|
14
|
-
const [parser] = this.parser;
|
15
|
-
|
16
|
-
return { parser } as const;
|
17
|
-
}
|
18
|
-
}
|
1
|
+
import Option from "./option";
|
2
|
+
|
3
|
+
export default class Jsonc extends Option<
|
4
|
+
"jsonc",
|
5
|
+
"jsonc",
|
6
|
+
false,
|
7
|
+
true,
|
8
|
+
1
|
9
|
+
> {
|
10
|
+
public readonly scope = "jsonc";
|
11
|
+
public readonly processor = {} as const;
|
12
|
+
|
13
|
+
public get languageOptions() {
|
14
|
+
const [parser] = this.parser;
|
15
|
+
|
16
|
+
return { parser } as const;
|
17
|
+
}
|
18
|
+
}
|
@@ -1,28 +1,28 @@
|
|
1
|
-
import Option from "./option";
|
2
|
-
import type Ts from "./ts";
|
3
|
-
|
4
|
-
export default class Mocha extends Option<
|
5
|
-
"mocha",
|
6
|
-
"mocha" | keyof Ts["option"]["plugins"],
|
7
|
-
true,
|
8
|
-
Ts["option"]["languageOptions"]["parserOptions"],
|
9
|
-
1,
|
10
|
-
"mocha"
|
11
|
-
> {
|
12
|
-
public readonly scope = "mocha";
|
13
|
-
public readonly processor = {} as const;
|
14
|
-
public readonly types = ["mocha"] as const;
|
15
|
-
|
16
|
-
public get languageOptions() {
|
17
|
-
const [parser] = this.parser,
|
18
|
-
globals = this.globals("mocha");
|
19
|
-
|
20
|
-
return {
|
21
|
-
ecmaVersion: "latest",
|
22
|
-
sourceType: "module",
|
23
|
-
parser,
|
24
|
-
parserOptions: { project: "tsconfig.json", ecmaVersion: "latest", sourceType: "module" },
|
25
|
-
globals,
|
26
|
-
} as const;
|
27
|
-
}
|
28
|
-
}
|
1
|
+
import Option from "./option";
|
2
|
+
import type Ts from "./ts";
|
3
|
+
|
4
|
+
export default class Mocha extends Option<
|
5
|
+
"mocha",
|
6
|
+
"mocha" | keyof Ts["option"]["plugins"],
|
7
|
+
true,
|
8
|
+
Ts["option"]["languageOptions"]["parserOptions"],
|
9
|
+
1,
|
10
|
+
"mocha"
|
11
|
+
> {
|
12
|
+
public readonly scope = "mocha";
|
13
|
+
public readonly processor = {} as const;
|
14
|
+
public readonly types = ["mocha"] as const;
|
15
|
+
|
16
|
+
public get languageOptions() {
|
17
|
+
const [parser] = this.parser,
|
18
|
+
globals = this.globals("mocha");
|
19
|
+
|
20
|
+
return {
|
21
|
+
ecmaVersion: "latest",
|
22
|
+
sourceType: "module",
|
23
|
+
parser,
|
24
|
+
parserOptions: { project: "tsconfig.json", ecmaVersion: "latest", sourceType: "module" },
|
25
|
+
globals,
|
26
|
+
} as const;
|
27
|
+
}
|
28
|
+
}
|