linted 33.6.1 → 33.7.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 +35 -35
- package/.markdownlint.jsonc +97 -97
- package/.mocharc.yml +11 -11
- package/LICENSE +20 -20
- package/README.md +351 -351
- package/dist/imports/index.d.ts +5 -5
- package/dist/imports/index.d.ts.map +1 -1
- package/dist/imports/plugins.d.ts +367 -6
- package/dist/imports/plugins.d.ts.map +1 -1
- package/dist/imports/plugins.js +3 -3
- package/dist/imports/plugins.js.map +1 -1
- package/eslint.config.js +3 -3
- package/package.json +99 -99
- package/src/imports/index.ts +7 -7
- package/src/imports/parsers.ts +9 -9
- package/src/imports/plugins.ts +23 -23
- package/src/imports/tsconfig.json +11 -11
- package/src/index.ts +23 -23
- package/src/scope/index.ts +14 -14
- package/src/scope/tree.ts +22 -22
- package/src/scope/tsconfig.json +7 -7
- package/src/settings/css.ts +9 -9
- package/src/settings/html.ts +11 -11
- package/src/settings/index.ts +15 -15
- package/src/settings/json.ts +8 -8
- package/src/settings/svelte.ts +10 -10
- package/src/settings/ts.ts +27 -27
- package/src/settings/tsconfig.json +6 -6
- package/src/settings/yml.ts +6 -6
- package/src/tsconfig-src.json +8 -8
- package/src/tsconfig.json +20 -20
- package/tests/index.spec.ts +37 -37
- package/tests/index.ts +11 -11
- package/tests/scope/index.spec.ts +136 -136
- package/tests/scope/tree.spec.ts +124 -124
- package/tests/tsconfig.json +19 -19
- package/tsconfig-base.json +38 -38
- package/typings/chai.d.ts +6 -6
- package/typings/jsonc.d.ts +7 -7
- package/typings/tsconfig.json +7 -7
package/package.json
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$pkg": "2411.6.1",
|
|
3
|
-
"$schema": "https://json.schemastore.org/package",
|
|
4
|
-
"$help": "https://docs.npmjs.com/cli/configuring-npm/package-json",
|
|
5
|
-
"name": "linted",
|
|
6
|
-
"version": "33.
|
|
7
|
-
"repository": "github:jimmy-zhening-luo/linted",
|
|
8
|
-
"description": "ESLint mono-plugin bundler with strict, opinionated defaults for (Stylistic) JavaScript, TypeScript, Svelte, HTML, Tailwind/CSS, JSON, JSONC, YAML, and Mocha.",
|
|
9
|
-
"keywords": [
|
|
10
|
-
"eslint",
|
|
11
|
-
"eslint-config",
|
|
12
|
-
"eslint-plugin",
|
|
13
|
-
"linter",
|
|
14
|
-
"formatter",
|
|
15
|
-
"typescript",
|
|
16
|
-
"javascript",
|
|
17
|
-
"stylistic",
|
|
18
|
-
"svelte",
|
|
19
|
-
"sveltekit",
|
|
20
|
-
"html",
|
|
21
|
-
"css",
|
|
22
|
-
"mocha",
|
|
23
|
-
"tailwindcss",
|
|
24
|
-
"json",
|
|
25
|
-
"jsonc",
|
|
26
|
-
"yaml"
|
|
27
|
-
],
|
|
28
|
-
"license": "MIT",
|
|
29
|
-
"private": false,
|
|
30
|
-
"engineStrict": true,
|
|
31
|
-
"engines": {
|
|
32
|
-
"node": "^24",
|
|
33
|
-
"npm": "^11"
|
|
34
|
-
},
|
|
35
|
-
"type": "module",
|
|
36
|
-
"main": "dist/index.js",
|
|
37
|
-
"types": "dist/index.d.ts",
|
|
38
|
-
"peerDependencies": {
|
|
39
|
-
"eslint": "~9.39.1",
|
|
40
|
-
"eslint-plugin-svelte": "~3.13.0",
|
|
41
|
-
"mocha": "11.0.0",
|
|
42
|
-
"typescript": "^5.9.3"
|
|
43
|
-
},
|
|
44
|
-
"peerDependenciesMeta": {
|
|
45
|
-
"eslint-plugin-svelte": {
|
|
46
|
-
"optional": true
|
|
47
|
-
},
|
|
48
|
-
"mocha": {
|
|
49
|
-
"optional": true
|
|
50
|
-
},
|
|
51
|
-
"typescript": {
|
|
52
|
-
"optional": true
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"dependencies": {
|
|
56
|
-
"@eslint/css": "0.14.1",
|
|
57
|
-
"@eslint/json": "0.14.0",
|
|
58
|
-
"@eslinted/core": "30.1.0",
|
|
59
|
-
"@eslinted/defaults": "17.
|
|
60
|
-
"@html-eslint/eslint-plugin": "0.
|
|
61
|
-
"@stylistic/eslint-plugin": "5.6.1",
|
|
62
|
-
"eslint-plugin-chai-expect": "3.1.0",
|
|
63
|
-
"eslint-plugin-chai-friendly": "1.1.0",
|
|
64
|
-
"eslint-plugin-jsonc": "2.21.0",
|
|
65
|
-
"eslint-plugin-mocha": "11.2.0",
|
|
66
|
-
"eslint-plugin-yml": "1.19.0",
|
|
67
|
-
"typescript-eslint": "8.47.0"
|
|
68
|
-
},
|
|
69
|
-
"devDependencies": {
|
|
70
|
-
"@types/chai": "^5.2.3",
|
|
71
|
-
"@types/mocha": "^10.0.10",
|
|
72
|
-
"chai": "^6.2.1",
|
|
73
|
-
"mocha": "11.0.0",
|
|
74
|
-
"ts-add-js-extension": "^1.6.6",
|
|
75
|
-
"typescript": "^5.9.3"
|
|
76
|
-
},
|
|
77
|
-
"scripts": {
|
|
78
|
-
"clean": "cmd --% /c \"for %G in (types dist build packed) do (if exist %G rmdir /s /q %G) & for %G in (.eslintcache) do (if exist %G del /f /q %G)\" || rm -rf types dist build packed .eslintcache",
|
|
79
|
-
"build": "npm run build:ts",
|
|
80
|
-
"build:ts": "tsc -b src",
|
|
81
|
-
"build:svelte": "svelte-kit sync && svelte-check && vite build",
|
|
82
|
-
"postbuild:ts": "npm run --if-present stage && ts-add-js-extension --showprogress=false --dir=dist",
|
|
83
|
-
"postbuild": "npm run lint || exit 0",
|
|
84
|
-
"lint": "eslint --cache --fix",
|
|
85
|
-
"pretest": "npm run build",
|
|
86
|
-
"test": "npm run --if-present test:suite",
|
|
87
|
-
"test:suite": "tsc -b tests && ts-add-js-extension --showprogress=false --dir=dist && mocha",
|
|
88
|
-
"prestart": "npm run build",
|
|
89
|
-
"start": "npm run start:ts",
|
|
90
|
-
"start:ts": "node .",
|
|
91
|
-
"start:svelte": "vite preview --open",
|
|
92
|
-
"prepublishOnly": "npm run clean && npm test",
|
|
93
|
-
"publish:release": "cmd --% /c \"for /f \"delims=-\" %a in (\"%npm_package_version%\") do if \"%a\" == \"%npm_package_version%\" (npm publish) else (npm publish --tag=next)\" || bash -c 'if [ \"${npm_package_version#*-}\" = \"${npm_package_version}\" ]; then npm publish; else npm publish --tag=next; fi'",
|
|
94
|
-
"predeploy": "npm run clean && npm test",
|
|
95
|
-
"stage": "",
|
|
96
|
-
"deploy": ""
|
|
97
|
-
},
|
|
98
|
-
"author": "Jimmy Zhening Luo <jimmy-zhening-luo@users.noreply.github.com> (https://jimm.my/)"
|
|
99
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$pkg": "2411.6.1",
|
|
3
|
+
"$schema": "https://json.schemastore.org/package",
|
|
4
|
+
"$help": "https://docs.npmjs.com/cli/configuring-npm/package-json",
|
|
5
|
+
"name": "linted",
|
|
6
|
+
"version": "33.7.0",
|
|
7
|
+
"repository": "github:jimmy-zhening-luo/linted",
|
|
8
|
+
"description": "ESLint mono-plugin bundler with strict, opinionated defaults for (Stylistic) JavaScript, TypeScript, Svelte, HTML, Tailwind/CSS, JSON, JSONC, YAML, and Mocha.",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"eslint",
|
|
11
|
+
"eslint-config",
|
|
12
|
+
"eslint-plugin",
|
|
13
|
+
"linter",
|
|
14
|
+
"formatter",
|
|
15
|
+
"typescript",
|
|
16
|
+
"javascript",
|
|
17
|
+
"stylistic",
|
|
18
|
+
"svelte",
|
|
19
|
+
"sveltekit",
|
|
20
|
+
"html",
|
|
21
|
+
"css",
|
|
22
|
+
"mocha",
|
|
23
|
+
"tailwindcss",
|
|
24
|
+
"json",
|
|
25
|
+
"jsonc",
|
|
26
|
+
"yaml"
|
|
27
|
+
],
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"private": false,
|
|
30
|
+
"engineStrict": true,
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": "^24",
|
|
33
|
+
"npm": "^11"
|
|
34
|
+
},
|
|
35
|
+
"type": "module",
|
|
36
|
+
"main": "dist/index.js",
|
|
37
|
+
"types": "dist/index.d.ts",
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"eslint": "~9.39.1",
|
|
40
|
+
"eslint-plugin-svelte": "~3.13.0",
|
|
41
|
+
"mocha": "11.0.0",
|
|
42
|
+
"typescript": "^5.9.3"
|
|
43
|
+
},
|
|
44
|
+
"peerDependenciesMeta": {
|
|
45
|
+
"eslint-plugin-svelte": {
|
|
46
|
+
"optional": true
|
|
47
|
+
},
|
|
48
|
+
"mocha": {
|
|
49
|
+
"optional": true
|
|
50
|
+
},
|
|
51
|
+
"typescript": {
|
|
52
|
+
"optional": true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@eslint/css": "0.14.1",
|
|
57
|
+
"@eslint/json": "0.14.0",
|
|
58
|
+
"@eslinted/core": "30.1.0",
|
|
59
|
+
"@eslinted/defaults": "17.4.0",
|
|
60
|
+
"@html-eslint/eslint-plugin": "0.49.0",
|
|
61
|
+
"@stylistic/eslint-plugin": "5.6.1",
|
|
62
|
+
"eslint-plugin-chai-expect": "3.1.0",
|
|
63
|
+
"eslint-plugin-chai-friendly": "1.1.0",
|
|
64
|
+
"eslint-plugin-jsonc": "2.21.0",
|
|
65
|
+
"eslint-plugin-mocha": "11.2.0",
|
|
66
|
+
"eslint-plugin-yml": "1.19.0",
|
|
67
|
+
"typescript-eslint": "8.47.0"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@types/chai": "^5.2.3",
|
|
71
|
+
"@types/mocha": "^10.0.10",
|
|
72
|
+
"chai": "^6.2.1",
|
|
73
|
+
"mocha": "11.0.0",
|
|
74
|
+
"ts-add-js-extension": "^1.6.6",
|
|
75
|
+
"typescript": "^5.9.3"
|
|
76
|
+
},
|
|
77
|
+
"scripts": {
|
|
78
|
+
"clean": "cmd --% /c \"for %G in (types dist build packed) do (if exist %G rmdir /s /q %G) & for %G in (.eslintcache) do (if exist %G del /f /q %G)\" || rm -rf types dist build packed .eslintcache",
|
|
79
|
+
"build": "npm run build:ts",
|
|
80
|
+
"build:ts": "tsc -b src",
|
|
81
|
+
"build:svelte": "svelte-kit sync && svelte-check && vite build",
|
|
82
|
+
"postbuild:ts": "npm run --if-present stage && ts-add-js-extension --showprogress=false --dir=dist",
|
|
83
|
+
"postbuild": "npm run lint || exit 0",
|
|
84
|
+
"lint": "eslint --cache --fix",
|
|
85
|
+
"pretest": "npm run build",
|
|
86
|
+
"test": "npm run --if-present test:suite",
|
|
87
|
+
"test:suite": "tsc -b tests && ts-add-js-extension --showprogress=false --dir=dist && mocha",
|
|
88
|
+
"prestart": "npm run build",
|
|
89
|
+
"start": "npm run start:ts",
|
|
90
|
+
"start:ts": "node .",
|
|
91
|
+
"start:svelte": "vite preview --open",
|
|
92
|
+
"prepublishOnly": "npm run clean && npm test",
|
|
93
|
+
"publish:release": "cmd --% /c \"for /f \"delims=-\" %a in (\"%npm_package_version%\") do if \"%a\" == \"%npm_package_version%\" (npm publish) else (npm publish --tag=next)\" || bash -c 'if [ \"${npm_package_version#*-}\" = \"${npm_package_version}\" ]; then npm publish; else npm publish --tag=next; fi'",
|
|
94
|
+
"predeploy": "npm run clean && npm test",
|
|
95
|
+
"stage": "",
|
|
96
|
+
"deploy": ""
|
|
97
|
+
},
|
|
98
|
+
"author": "Jimmy Zhening Luo <jimmy-zhening-luo@users.noreply.github.com> (https://jimm.my/)"
|
|
99
|
+
}
|
package/src/imports/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import parsers from "./parsers";
|
|
2
|
-
import plugins from "./plugins";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
parsers,
|
|
6
|
-
plugins,
|
|
7
|
-
};
|
|
1
|
+
import parsers from "./parsers";
|
|
2
|
+
import plugins from "./plugins";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
parsers,
|
|
6
|
+
plugins,
|
|
7
|
+
};
|
package/src/imports/parsers.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { parser as ts } from "typescript-eslint";
|
|
2
|
-
import html from "@html-eslint/parser";
|
|
3
|
-
import yml from "yaml-eslint-parser";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
ts: ts as NoInfer<typeof ts>,
|
|
7
|
-
html,
|
|
8
|
-
yml,
|
|
9
|
-
};
|
|
1
|
+
import { parser as ts } from "typescript-eslint";
|
|
2
|
+
import html from "@html-eslint/parser";
|
|
3
|
+
import yml from "yaml-eslint-parser";
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
ts: ts as NoInfer<typeof ts>,
|
|
7
|
+
html,
|
|
8
|
+
yml,
|
|
9
|
+
};
|
package/src/imports/plugins.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import stylistic from "@stylistic/eslint-plugin";
|
|
2
|
-
import { plugin as ts } from "typescript-eslint";
|
|
3
|
-
import mocha from "eslint-plugin-mocha";
|
|
4
|
-
import chai from "eslint-plugin-chai-friendly";
|
|
5
|
-
import chaiExpect from "eslint-plugin-chai-expect";
|
|
6
|
-
import html from "@html-eslint/eslint-plugin";
|
|
7
|
-
import css from "@eslint/css";
|
|
8
|
-
import json from "@eslint/json";
|
|
9
|
-
import jsonc from "eslint-plugin-jsonc";
|
|
10
|
-
import yml from "eslint-plugin-yml";
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
stylistic
|
|
14
|
-
ts: ts as NoInfer<typeof ts>,
|
|
15
|
-
mocha,
|
|
16
|
-
chai,
|
|
17
|
-
"chai-expect": chaiExpect,
|
|
18
|
-
html,
|
|
19
|
-
css,
|
|
20
|
-
json,
|
|
21
|
-
jsonc
|
|
22
|
-
yml,
|
|
23
|
-
};
|
|
1
|
+
import stylistic from "@stylistic/eslint-plugin";
|
|
2
|
+
import { plugin as ts } from "typescript-eslint";
|
|
3
|
+
import mocha from "eslint-plugin-mocha";
|
|
4
|
+
import chai from "eslint-plugin-chai-friendly";
|
|
5
|
+
import chaiExpect from "eslint-plugin-chai-expect";
|
|
6
|
+
import html from "@html-eslint/eslint-plugin";
|
|
7
|
+
import css from "@eslint/css";
|
|
8
|
+
import json from "@eslint/json";
|
|
9
|
+
import jsonc from "eslint-plugin-jsonc";
|
|
10
|
+
import yml from "eslint-plugin-yml";
|
|
11
|
+
|
|
12
|
+
export default {
|
|
13
|
+
stylistic,
|
|
14
|
+
ts: ts as NoInfer<typeof ts>,
|
|
15
|
+
mocha,
|
|
16
|
+
chai,
|
|
17
|
+
"chai-expect": chaiExpect,
|
|
18
|
+
html: html as object,
|
|
19
|
+
css,
|
|
20
|
+
json,
|
|
21
|
+
jsonc,
|
|
22
|
+
yml,
|
|
23
|
+
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files": [
|
|
3
|
-
"index.ts",
|
|
4
|
-
"plugins.ts",
|
|
5
|
-
"parsers.ts",
|
|
6
|
-
],
|
|
7
|
-
"extends": "../tsconfig-src.json",
|
|
8
|
-
"include": [
|
|
9
|
-
"../../typings/**/*",
|
|
10
|
-
],
|
|
11
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"files": [
|
|
3
|
+
"index.ts",
|
|
4
|
+
"plugins.ts",
|
|
5
|
+
"parsers.ts",
|
|
6
|
+
],
|
|
7
|
+
"extends": "../tsconfig-src.json",
|
|
8
|
+
"include": [
|
|
9
|
+
"../../typings/**/*",
|
|
10
|
+
],
|
|
11
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import Core from "@eslinted/core";
|
|
2
|
-
import {
|
|
3
|
-
scopes,
|
|
4
|
-
optional,
|
|
5
|
-
tree,
|
|
6
|
-
} from "./scope";
|
|
7
|
-
import imports from "./imports";
|
|
8
|
-
import settings from "./settings";
|
|
9
|
-
import defaults from "@eslinted/defaults";
|
|
10
|
-
|
|
11
|
-
export default function (
|
|
12
|
-
extensions?: Parameters<typeof Core>[6],
|
|
13
|
-
) {
|
|
14
|
-
return Core(
|
|
15
|
-
scopes,
|
|
16
|
-
optional,
|
|
17
|
-
tree,
|
|
18
|
-
imports,
|
|
19
|
-
settings,
|
|
20
|
-
defaults,
|
|
21
|
-
extensions,
|
|
22
|
-
);
|
|
23
|
-
}
|
|
1
|
+
import Core from "@eslinted/core";
|
|
2
|
+
import {
|
|
3
|
+
scopes,
|
|
4
|
+
optional,
|
|
5
|
+
tree,
|
|
6
|
+
} from "./scope";
|
|
7
|
+
import imports from "./imports";
|
|
8
|
+
import settings from "./settings";
|
|
9
|
+
import defaults from "@eslinted/defaults";
|
|
10
|
+
|
|
11
|
+
export default function (
|
|
12
|
+
extensions?: Parameters<typeof Core>[6],
|
|
13
|
+
) {
|
|
14
|
+
return Core(
|
|
15
|
+
scopes,
|
|
16
|
+
optional,
|
|
17
|
+
tree,
|
|
18
|
+
imports,
|
|
19
|
+
settings,
|
|
20
|
+
defaults,
|
|
21
|
+
extensions,
|
|
22
|
+
);
|
|
23
|
+
}
|
package/src/scope/index.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { tree } from "./tree";
|
|
2
|
-
export const scopes = [
|
|
3
|
-
"js",
|
|
4
|
-
"ts",
|
|
5
|
-
"mocha",
|
|
6
|
-
"svelte",
|
|
7
|
-
"html",
|
|
8
|
-
"css",
|
|
9
|
-
"json",
|
|
10
|
-
"jsonc",
|
|
11
|
-
"jsoncc",
|
|
12
|
-
"yml",
|
|
13
|
-
] as const,
|
|
14
|
-
optional = ["svelte"] as const;
|
|
1
|
+
export { tree } from "./tree";
|
|
2
|
+
export const scopes = [
|
|
3
|
+
"js",
|
|
4
|
+
"ts",
|
|
5
|
+
"mocha",
|
|
6
|
+
"svelte",
|
|
7
|
+
"html",
|
|
8
|
+
"css",
|
|
9
|
+
"json",
|
|
10
|
+
"jsonc",
|
|
11
|
+
"jsoncc",
|
|
12
|
+
"yml",
|
|
13
|
+
] as const,
|
|
14
|
+
optional = ["svelte"] as const;
|
package/src/scope/tree.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export const tree = [
|
|
2
|
-
[
|
|
3
|
-
"jsoncc",
|
|
4
|
-
["jsonc"],
|
|
5
|
-
] as const,
|
|
6
|
-
[
|
|
7
|
-
"jsonc",
|
|
8
|
-
["json"],
|
|
9
|
-
] as const,
|
|
10
|
-
[
|
|
11
|
-
"mocha",
|
|
12
|
-
["ts"],
|
|
13
|
-
] as const,
|
|
14
|
-
[
|
|
15
|
-
"svelte",
|
|
16
|
-
["ts"],
|
|
17
|
-
] as const,
|
|
18
|
-
[
|
|
19
|
-
"ts",
|
|
20
|
-
["js"],
|
|
21
|
-
] as const,
|
|
22
|
-
];
|
|
1
|
+
export const tree = [
|
|
2
|
+
[
|
|
3
|
+
"jsoncc",
|
|
4
|
+
["jsonc"],
|
|
5
|
+
] as const,
|
|
6
|
+
[
|
|
7
|
+
"jsonc",
|
|
8
|
+
["json"],
|
|
9
|
+
] as const,
|
|
10
|
+
[
|
|
11
|
+
"mocha",
|
|
12
|
+
["ts"],
|
|
13
|
+
] as const,
|
|
14
|
+
[
|
|
15
|
+
"svelte",
|
|
16
|
+
["ts"],
|
|
17
|
+
] as const,
|
|
18
|
+
[
|
|
19
|
+
"ts",
|
|
20
|
+
["js"],
|
|
21
|
+
] as const,
|
|
22
|
+
];
|
package/src/scope/tsconfig.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
{
|
|
2
|
-
"files": [
|
|
3
|
-
"index.ts",
|
|
4
|
-
"tree.ts",
|
|
5
|
-
],
|
|
6
|
-
"extends": "../tsconfig-src.json",
|
|
7
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"files": [
|
|
3
|
+
"index.ts",
|
|
4
|
+
"tree.ts",
|
|
5
|
+
],
|
|
6
|
+
"extends": "../tsconfig-src.json",
|
|
7
|
+
}
|
package/src/settings/css.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { CSSLanguageOptions } from "@eslint/css";
|
|
2
|
-
|
|
3
|
-
// DOC: https://github.com/eslint/css?tab=readme-ov-file#languages
|
|
4
|
-
export default {
|
|
5
|
-
languageOptions: {
|
|
6
|
-
tolerant: false /* @default: true | INFO: https://github.com/eslint/css?tab=readme-ov-file#tolerant-mode */,
|
|
7
|
-
} satisfies CSSLanguageOptions,
|
|
8
|
-
language: "css/css",
|
|
9
|
-
};
|
|
1
|
+
import type { CSSLanguageOptions } from "@eslint/css";
|
|
2
|
+
|
|
3
|
+
// DOC: https://github.com/eslint/css?tab=readme-ov-file#languages
|
|
4
|
+
export default {
|
|
5
|
+
languageOptions: {
|
|
6
|
+
tolerant: false /* @default: true | INFO: https://github.com/eslint/css?tab=readme-ov-file#tolerant-mode */,
|
|
7
|
+
} satisfies CSSLanguageOptions,
|
|
8
|
+
language: "css/css",
|
|
9
|
+
};
|
package/src/settings/html.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { ParserOptions } from "@html-eslint/parser";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
languageOptions: {
|
|
5
|
-
parser: "html" as const,
|
|
6
|
-
},
|
|
7
|
-
parserOptions: {
|
|
8
|
-
frontmatter: true /* @default: false | INFO: https://html-eslint.org/docs/integrating-template-engine#skip-frontmatter */,
|
|
9
|
-
} satisfies ParserOptions,
|
|
10
|
-
language: "html/html",
|
|
11
|
-
};
|
|
1
|
+
import type { ParserOptions } from "@html-eslint/parser";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
languageOptions: {
|
|
5
|
+
parser: "html" as const,
|
|
6
|
+
},
|
|
7
|
+
parserOptions: {
|
|
8
|
+
frontmatter: true /* @default: false | INFO: https://html-eslint.org/docs/integrating-template-engine#skip-frontmatter */,
|
|
9
|
+
} satisfies ParserOptions,
|
|
10
|
+
language: "html/html",
|
|
11
|
+
};
|
package/src/settings/index.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import ts from "./ts";
|
|
2
|
-
import svelte from "./svelte";
|
|
3
|
-
import html from "./html";
|
|
4
|
-
import css from "./css";
|
|
5
|
-
import json from "./json";
|
|
6
|
-
import yml from "./yml";
|
|
7
|
-
|
|
8
|
-
export default {
|
|
9
|
-
ts,
|
|
10
|
-
svelte,
|
|
11
|
-
html,
|
|
12
|
-
css,
|
|
13
|
-
json,
|
|
14
|
-
yml,
|
|
15
|
-
};
|
|
1
|
+
import ts from "./ts";
|
|
2
|
+
import svelte from "./svelte";
|
|
3
|
+
import html from "./html";
|
|
4
|
+
import css from "./css";
|
|
5
|
+
import json from "./json";
|
|
6
|
+
import yml from "./yml";
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
ts,
|
|
10
|
+
svelte,
|
|
11
|
+
html,
|
|
12
|
+
css,
|
|
13
|
+
json,
|
|
14
|
+
yml,
|
|
15
|
+
};
|
package/src/settings/json.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { JSONLanguageOptions } from "@eslint/json";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
languageOptions: {
|
|
5
|
-
allowTrailingCommas: true /* INFO: https://github.com/eslint/json?tab=readme-ov-file#allowing-trailing-commas-in-jsonc */,
|
|
6
|
-
} satisfies JSONLanguageOptions,
|
|
7
|
-
language: "json/jsonc" /* INFO: `languageOptions.allowTrailingCommas` is only available on language `json/jsonc` */,
|
|
8
|
-
};
|
|
1
|
+
import type { JSONLanguageOptions } from "@eslint/json";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
languageOptions: {
|
|
5
|
+
allowTrailingCommas: true /* INFO: https://github.com/eslint/json?tab=readme-ov-file#allowing-trailing-commas-in-jsonc */,
|
|
6
|
+
} satisfies JSONLanguageOptions,
|
|
7
|
+
language: "json/jsonc" /* INFO: `languageOptions.allowTrailingCommas` is only available on language `json/jsonc` */,
|
|
8
|
+
};
|
package/src/settings/svelte.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
languageOptions: {
|
|
3
|
-
parser: "svelte" as const,
|
|
4
|
-
},
|
|
5
|
-
parserOptions: {
|
|
6
|
-
parser: "ts" as const,
|
|
7
|
-
// extraFileExtensions: [".svelte"] /* inherits TS, needed for performance reasons: BUG: https://typescript-eslint.io/troubleshooting/typed-linting/performance/#changes-to-extrafileextensions-with-projectservice */,
|
|
8
|
-
},
|
|
9
|
-
processor: "svelte/svelte",
|
|
10
|
-
};
|
|
1
|
+
export default {
|
|
2
|
+
languageOptions: {
|
|
3
|
+
parser: "svelte" as const,
|
|
4
|
+
},
|
|
5
|
+
parserOptions: {
|
|
6
|
+
parser: "ts" as const,
|
|
7
|
+
// extraFileExtensions: [".svelte"] /* inherits TS, needed for performance reasons: BUG: https://typescript-eslint.io/troubleshooting/typed-linting/performance/#changes-to-extrafileextensions-with-projectservice */,
|
|
8
|
+
},
|
|
9
|
+
processor: "svelte/svelte",
|
|
10
|
+
};
|
package/src/settings/ts.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import type { ParserOptions } from "@typescript-eslint/types";
|
|
2
|
-
|
|
3
|
-
// DOC: https://typescript-eslint.io/packages/parser/#configuration
|
|
4
|
-
|
|
5
|
-
type TsParserOptions = ParserOptions & {
|
|
6
|
-
disallowAutomaticSingleRunInference?: boolean;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
languageOptions: {
|
|
11
|
-
parser: "ts" as const,
|
|
12
|
-
},
|
|
13
|
-
parserOptions: {
|
|
14
|
-
ecmaFeatures: {
|
|
15
|
-
// jsx: false /* @default false */,
|
|
16
|
-
globalReturn: true /* @default false */,
|
|
17
|
-
},
|
|
18
|
-
projectService: true /* ProjectServiceOptions | true | @default false */,
|
|
19
|
-
// INFO: `parserOptions.projectService` is the modern replacement for the deprecated `parserOptions.project`:
|
|
20
|
-
// - https://typescript-eslint.io/blog/project-service/
|
|
21
|
-
// - https://typescript-eslint.io/packages/parser/#projectserviceoptions
|
|
22
|
-
// - https://typescript-eslint.io/getting-started/typed-linting/
|
|
23
|
-
// - https://typescript-eslint.io/troubleshooting/typed-linting/
|
|
24
|
-
warnOnUnsupportedTypeScriptVersion: false /* preference due to nuisance | @default true */,
|
|
25
|
-
extraFileExtensions: [".svelte"] /* BUG: Needed to avoid performance issues in Svelte/TS projects: https://typescript-eslint.io/troubleshooting/typed-linting/performance/#changes-to-extrafileextensions-with-projectservice */,
|
|
26
|
-
} satisfies TsParserOptions,
|
|
27
|
-
};
|
|
1
|
+
import type { ParserOptions } from "@typescript-eslint/types";
|
|
2
|
+
|
|
3
|
+
// DOC: https://typescript-eslint.io/packages/parser/#configuration
|
|
4
|
+
|
|
5
|
+
type TsParserOptions = ParserOptions & {
|
|
6
|
+
disallowAutomaticSingleRunInference?: boolean;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
languageOptions: {
|
|
11
|
+
parser: "ts" as const,
|
|
12
|
+
},
|
|
13
|
+
parserOptions: {
|
|
14
|
+
ecmaFeatures: {
|
|
15
|
+
// jsx: false /* @default false */,
|
|
16
|
+
globalReturn: true /* @default false */,
|
|
17
|
+
},
|
|
18
|
+
projectService: true /* ProjectServiceOptions | true | @default false */,
|
|
19
|
+
// INFO: `parserOptions.projectService` is the modern replacement for the deprecated `parserOptions.project`:
|
|
20
|
+
// - https://typescript-eslint.io/blog/project-service/
|
|
21
|
+
// - https://typescript-eslint.io/packages/parser/#projectserviceoptions
|
|
22
|
+
// - https://typescript-eslint.io/getting-started/typed-linting/
|
|
23
|
+
// - https://typescript-eslint.io/troubleshooting/typed-linting/
|
|
24
|
+
warnOnUnsupportedTypeScriptVersion: false /* preference due to nuisance | @default true */,
|
|
25
|
+
extraFileExtensions: [".svelte"] /* BUG: Needed to avoid performance issues in Svelte/TS projects: https://typescript-eslint.io/troubleshooting/typed-linting/performance/#changes-to-extrafileextensions-with-projectservice */,
|
|
26
|
+
} satisfies TsParserOptions,
|
|
27
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../tsconfig-src.json",
|
|
3
|
-
"include": [
|
|
4
|
-
"*",
|
|
5
|
-
],
|
|
6
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig-src.json",
|
|
3
|
+
"include": [
|
|
4
|
+
"*",
|
|
5
|
+
],
|
|
6
|
+
}
|
package/src/settings/yml.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// DOC: https://github.com/ota-meshi/yaml-eslint-parser?tab=readme-ov-file#advanced-configuration
|
|
2
|
-
export default {
|
|
3
|
-
languageOptions: {
|
|
4
|
-
parser: "yml" as const,
|
|
5
|
-
},
|
|
6
|
-
};
|
|
1
|
+
// DOC: https://github.com/ota-meshi/yaml-eslint-parser?tab=readme-ov-file#advanced-configuration
|
|
2
|
+
export default {
|
|
3
|
+
languageOptions: {
|
|
4
|
+
parser: "yml" as const,
|
|
5
|
+
},
|
|
6
|
+
};
|