linted 16.1.0 → 16.1.1-rc.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/imports/index.d.ts +1 -1
- package/dist/imports/index.d.ts.map +1 -1
- package/dist/imports/index.js +1 -1
- package/dist/imports/index.js.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/statics/index.d.ts +1 -1
- package/dist/statics/index.d.ts.map +1 -1
- package/dist/statics/index.js +1 -1
- package/dist/statics/index.js.map +1 -1
- package/dist/statics/rules/index.d.ts +23 -23
- package/dist/statics/rules/presets/Html.d.ts.map +1 -1
- package/dist/statics/rules/presets/Html.js +1 -4
- package/dist/statics/rules/presets/Html.js.map +1 -1
- package/dist/statics/rules/presets/Js.d.ts +4 -4
- package/dist/statics/rules/presets/Js.d.ts.map +1 -1
- package/dist/statics/rules/presets/Js.js +1 -4
- package/dist/statics/rules/presets/Js.js.map +1 -1
- package/dist/statics/rules/presets/Json.d.ts +1 -1
- package/dist/statics/rules/presets/Json.d.ts.map +1 -1
- package/dist/statics/rules/presets/Json.js +1 -4
- package/dist/statics/rules/presets/Json.js.map +1 -1
- package/dist/statics/rules/presets/Jsonc.d.ts +1 -1
- package/dist/statics/rules/presets/Jsonc.d.ts.map +1 -1
- package/dist/statics/rules/presets/Jsonc.js +1 -4
- package/dist/statics/rules/presets/Jsonc.js.map +1 -1
- package/dist/statics/rules/presets/Mocha.d.ts.map +1 -1
- package/dist/statics/rules/presets/Mocha.js +1 -4
- package/dist/statics/rules/presets/Mocha.js.map +1 -1
- package/dist/statics/rules/presets/Svelte.d.ts +8 -8
- package/dist/statics/rules/presets/Ts.d.ts +8 -8
- package/dist/statics/rules/presets/Yml.d.ts +1 -1
- package/dist/statics/rules/presets/Yml.d.ts.map +1 -1
- package/dist/statics/rules/presets/Yml.js +1 -4
- package/dist/statics/rules/presets/Yml.js.map +1 -1
- package/dist/statics/rules/presets/html/Enable.d.ts.map +1 -1
- package/dist/statics/rules/presets/html/Enable.js +1 -4
- package/dist/statics/rules/presets/html/Enable.js.map +1 -1
- package/dist/statics/rules/presets/html/Recommended.d.ts.map +1 -1
- package/dist/statics/rules/presets/html/Recommended.js +1 -4
- package/dist/statics/rules/presets/html/Recommended.js.map +1 -1
- package/dist/statics/rules/presets/index.d.ts +1 -1
- package/dist/statics/rules/presets/index.d.ts.map +1 -1
- package/dist/statics/rules/presets/index.js.map +1 -1
- package/dist/statics/rules/presets/js/Enable.d.ts.map +1 -1
- package/dist/statics/rules/presets/js/Enable.js +51 -254
- package/dist/statics/rules/presets/js/Enable.js.map +1 -1
- package/dist/statics/rules/presets/js/EnableStylistic.d.ts +4 -4
- package/dist/statics/rules/presets/js/EnableStylistic.d.ts.map +1 -1
- package/dist/statics/rules/presets/js/EnableStylistic.js +85 -486
- package/dist/statics/rules/presets/js/EnableStylistic.js.map +1 -1
- package/dist/statics/rules/presets/json/Enable.d.ts.map +1 -1
- package/dist/statics/rules/presets/json/Enable.js.map +1 -1
- package/dist/statics/rules/presets/json/EnableX.d.ts +1 -1
- package/dist/statics/rules/presets/json/EnableX.d.ts.map +1 -1
- package/dist/statics/rules/presets/json/EnableX.js +12 -66
- package/dist/statics/rules/presets/json/EnableX.js.map +1 -1
- package/dist/statics/rules/presets/jsonc/OverrideJson.d.ts.map +1 -1
- package/dist/statics/rules/presets/jsonc/OverrideJson.js +2 -11
- package/dist/statics/rules/presets/jsonc/OverrideJson.js.map +1 -1
- package/dist/statics/rules/presets/md/Enable.d.ts.map +1 -1
- package/dist/statics/rules/presets/md/Enable.js +11 -49
- package/dist/statics/rules/presets/md/Enable.js.map +1 -1
- package/dist/statics/rules/presets/mocha/Enable.d.ts.map +1 -1
- package/dist/statics/rules/presets/mocha/Enable.js +1 -4
- package/dist/statics/rules/presets/mocha/Enable.js.map +1 -1
- package/dist/statics/rules/presets/mocha/Recommended.d.ts.map +1 -1
- package/dist/statics/rules/presets/mocha/Recommended.js +1 -4
- package/dist/statics/rules/presets/mocha/Recommended.js.map +1 -1
- package/dist/statics/rules/presets/svelte/DisableJS.d.ts.map +1 -1
- package/dist/statics/rules/presets/svelte/DisableJS.js +1 -7
- package/dist/statics/rules/presets/svelte/DisableJS.js.map +1 -1
- package/dist/statics/rules/presets/svelte/DisableTS.d.ts.map +1 -1
- package/dist/statics/rules/presets/svelte/DisableTS.js +1 -7
- package/dist/statics/rules/presets/svelte/DisableTS.js.map +1 -1
- package/dist/statics/rules/presets/svelte/DisableX.d.ts.map +1 -1
- package/dist/statics/rules/presets/svelte/DisableX.js +1 -6
- package/dist/statics/rules/presets/svelte/DisableX.js.map +1 -1
- package/dist/statics/rules/presets/svelte/Enable.d.ts.map +1 -1
- package/dist/statics/rules/presets/svelte/Enable.js +19 -108
- package/dist/statics/rules/presets/svelte/Enable.js.map +1 -1
- package/dist/statics/rules/presets/svelte/EnableX.d.ts.map +1 -1
- package/dist/statics/rules/presets/svelte/EnableX.js +2 -12
- package/dist/statics/rules/presets/svelte/EnableX.js.map +1 -1
- package/dist/statics/rules/presets/ts/DisableX.d.ts.map +1 -1
- package/dist/statics/rules/presets/ts/DisableX.js.map +1 -1
- package/dist/statics/rules/presets/ts/Enable.d.ts +4 -4
- package/dist/statics/rules/presets/ts/Enable.d.ts.map +1 -1
- package/dist/statics/rules/presets/ts/Enable.js +38 -175
- package/dist/statics/rules/presets/ts/Enable.js.map +1 -1
- package/dist/statics/rules/presets/ts/EnableX.d.ts.map +1 -1
- package/dist/statics/rules/presets/ts/EnableX.js +4 -29
- package/dist/statics/rules/presets/ts/EnableX.js.map +1 -1
- package/dist/statics/rules/presets/yml/Enable.d.ts.map +1 -1
- package/dist/statics/rules/presets/yml/Enable.js +9 -50
- package/dist/statics/rules/presets/yml/Enable.js.map +1 -1
- package/dist/statics/rules/presets/yml/EnableX.d.ts +1 -1
- package/dist/statics/rules/presets/yml/EnableX.d.ts.map +1 -1
- package/dist/statics/rules/presets/yml/EnableX.js +9 -60
- package/dist/statics/rules/presets/yml/EnableX.js.map +1 -1
- package/dist/statics/rules/strings/level/index.d.ts +1 -1
- package/dist/statics/rules/strings/level/index.d.ts.map +1 -1
- package/dist/statics/rules/strings/level/index.js +1 -1
- package/dist/statics/rules/strings/level/index.js.map +1 -1
- package/dist/statics/rules/strings/state/index.d.ts +2 -2
- package/dist/statics/rules/strings/state/index.d.ts.map +1 -1
- package/dist/statics/rules/strings/state/index.js +2 -2
- package/dist/statics/rules/strings/state/index.js.map +1 -1
- package/package.json +3 -2
- package/src/imports/index.ts +1 -4
- package/src/index.ts +18 -7
- package/src/statics/index.ts +1 -4
- package/src/statics/rules/presets/Html.ts +1 -4
- package/src/statics/rules/presets/Js.ts +1 -4
- package/src/statics/rules/presets/Json.ts +1 -4
- package/src/statics/rules/presets/Jsonc.ts +1 -4
- package/src/statics/rules/presets/Mocha.ts +1 -4
- package/src/statics/rules/presets/Yml.ts +1 -4
- package/src/statics/rules/presets/html/Enable.ts +1 -4
- package/src/statics/rules/presets/html/Recommended.ts +2 -4
- package/src/statics/rules/presets/index.ts +1 -4
- package/src/statics/rules/presets/js/Enable.ts +53 -257
- package/src/statics/rules/presets/js/EnableStylistic.ts +86 -490
- package/src/statics/rules/presets/json/Enable.ts +0 -1
- package/src/statics/rules/presets/json/EnableX.ts +12 -67
- package/src/statics/rules/presets/jsonc/OverrideJson.ts +3 -19
- package/src/statics/rules/presets/md/Enable.ts +11 -50
- package/src/statics/rules/presets/mocha/Enable.ts +1 -4
- package/src/statics/rules/presets/mocha/Recommended.ts +2 -4
- package/src/statics/rules/presets/svelte/DisableJS.ts +3 -10
- package/src/statics/rules/presets/svelte/DisableTS.ts +1 -7
- package/src/statics/rules/presets/svelte/DisableX.ts +2 -11
- package/src/statics/rules/presets/svelte/Enable.ts +50 -137
- package/src/statics/rules/presets/svelte/EnableX.ts +3 -21
- package/src/statics/rules/presets/ts/DisableX.ts +1 -2
- package/src/statics/rules/presets/ts/Enable.ts +39 -191
- package/src/statics/rules/presets/ts/EnableX.ts +9 -41
- package/src/statics/rules/presets/yml/Enable.ts +9 -59
- package/src/statics/rules/presets/yml/EnableX.ts +9 -69
- package/src/statics/rules/strings/level/index.ts +1 -5
- package/src/statics/rules/strings/state/index.ts +2 -0
@@ -16,45 +16,14 @@ const {
|
|
16
16
|
export default [
|
17
17
|
EnableX,
|
18
18
|
{
|
19
|
-
|
20
19
|
// https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#extension-rules
|
21
|
-
"jsonc/array-bracket-newline": [
|
22
|
-
|
23
|
-
|
24
|
-
],
|
25
|
-
"jsonc/
|
26
|
-
|
27
|
-
|
28
|
-
{
|
29
|
-
singleValue: false,
|
30
|
-
objectsInArrays: false,
|
31
|
-
arraysInArrays: false,
|
32
|
-
},
|
33
|
-
],
|
34
|
-
"jsonc/array-element-newline": [
|
35
|
-
ERROR,
|
36
|
-
ALWAYS,
|
37
|
-
],
|
38
|
-
"jsonc/comma-dangle": [
|
39
|
-
ERROR,
|
40
|
-
NEVER, // trailing commas are NOT allowed in JSON
|
41
|
-
],
|
42
|
-
"jsonc/comma-style": [
|
43
|
-
ERROR,
|
44
|
-
LAST,
|
45
|
-
],
|
46
|
-
"jsonc/indent": [
|
47
|
-
ERROR,
|
48
|
-
2,
|
49
|
-
],
|
50
|
-
"jsonc/key-spacing": [
|
51
|
-
ERROR,
|
52
|
-
{
|
53
|
-
beforeColon: false,
|
54
|
-
afterColon: true,
|
55
|
-
mode: STRICT,
|
56
|
-
},
|
57
|
-
],
|
20
|
+
"jsonc/array-bracket-newline": [ERROR, CONSISTENT],
|
21
|
+
"jsonc/array-bracket-spacing": [ERROR, NEVER, { singleValue: false, objectsInArrays: false, arraysInArrays: false }],
|
22
|
+
"jsonc/array-element-newline": [ERROR, ALWAYS],
|
23
|
+
"jsonc/comma-dangle": [ERROR, NEVER], /* // trailing commas are NOT allowed in JSON */
|
24
|
+
"jsonc/comma-style": [ERROR, LAST],
|
25
|
+
"jsonc/indent": [ERROR, 2],
|
26
|
+
"jsonc/key-spacing": [ERROR, { beforeColon: false, afterColon: true, mode: STRICT }],
|
58
27
|
"jsonc/no-dupe-keys": ERROR,
|
59
28
|
"jsonc/no-floating-decimal": ERROR,
|
60
29
|
"jsonc/no-irregular-whitespace": [
|
@@ -72,35 +41,11 @@ export default [
|
|
72
41
|
"jsonc/no-octal": ERROR,
|
73
42
|
"jsonc/no-sparse-arrays": ERROR,
|
74
43
|
"jsonc/no-useless-escape": ERROR,
|
75
|
-
"jsonc/object-curly-newline": [
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
consistent: true,
|
81
|
-
},
|
82
|
-
],
|
83
|
-
"jsonc/object-curly-spacing": [
|
84
|
-
ERROR,
|
85
|
-
ALWAYS,
|
86
|
-
{
|
87
|
-
arraysInObjects: true,
|
88
|
-
objectsInObjects: true,
|
89
|
-
},
|
90
|
-
],
|
91
|
-
"jsonc/object-property-newline": [
|
92
|
-
ERROR,
|
93
|
-
{ allowAllPropertiesOnSameLine: false },
|
94
|
-
],
|
95
|
-
"jsonc/quote-props": [
|
96
|
-
ERROR,
|
97
|
-
ALWAYS,
|
98
|
-
],
|
99
|
-
"jsonc/quotes": [
|
100
|
-
ERROR,
|
101
|
-
DOUBLE,
|
102
|
-
{ avoidEscape: false },
|
103
|
-
],
|
44
|
+
"jsonc/object-curly-newline": [ERROR, { consistent: true, multiline: true, minProperties: 2 }],
|
45
|
+
"jsonc/object-curly-spacing": [ERROR, ALWAYS, { arraysInObjects: true, objectsInObjects: true }],
|
46
|
+
"jsonc/object-property-newline": [ERROR, { allowAllPropertiesOnSameLine: false }],
|
47
|
+
"jsonc/quote-props": [ERROR, ALWAYS],
|
48
|
+
"jsonc/quotes": [ERROR, DOUBLE, { avoidEscape: false }],
|
104
49
|
"jsonc/space-unary-ops": ERROR,
|
105
50
|
},
|
106
51
|
] as const satisfies RuleEntry;
|
@@ -1,22 +1,6 @@
|
|
1
1
|
import { Strings, type RuleEntry } from "../index.js";
|
2
2
|
|
3
|
-
const {
|
4
|
-
Id: { Override },
|
5
|
-
Level: { ERROR, OFF },
|
6
|
-
State: {
|
7
|
-
ALWAYS_MULTILINE,
|
8
|
-
},
|
9
|
-
} = Strings;
|
3
|
+
const { Id: { Override }, Level: { ERROR, OFF }, State: { ALWAYS_MULTILINE } } = Strings;
|
10
4
|
|
11
|
-
|
12
|
-
|
13
|
-
{
|
14
|
-
|
15
|
-
// https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
|
16
|
-
"jsonc/no-comments": OFF, // comments are allowed in JSONC
|
17
|
-
"jsonc/comma-dangle": [
|
18
|
-
ERROR,
|
19
|
-
ALWAYS_MULTILINE, // trailing commas are allowed in JSONC
|
20
|
-
],
|
21
|
-
},
|
22
|
-
] as const satisfies RuleEntry;
|
5
|
+
// https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
|
6
|
+
export default [Override, { "jsonc/no-comments": OFF /* comments are allowed in JSONC */, "jsonc/comma-dangle": [ERROR, ALWAYS_MULTILINE] /* trailing commas are allowed in JSONC */ }] as const satisfies RuleEntry;
|
@@ -5,58 +5,19 @@ const { Id: { Enable }, Level: { ERROR, OFF } } = Strings;
|
|
5
5
|
export default [
|
6
6
|
Enable,
|
7
7
|
{
|
8
|
-
|
9
8
|
// Rules 1-50 supported by this shit plugin: https://gitlab.com/pawelbbdrozd/eslint-plugin-markdownlint/-/tree/main/lib/rules?ref_type=heads
|
10
9
|
// Rules 1-56 supported by this good plugin: https://github.com/DavidAnson/markdownlint/blob/main/doc/md001.md
|
11
|
-
"markdownlint/md003": [
|
12
|
-
|
13
|
-
|
14
|
-
],
|
15
|
-
"markdownlint/md004": [
|
16
|
-
ERROR,
|
17
|
-
{ style: "dash" },
|
18
|
-
],
|
19
|
-
"markdownlint/md009": [
|
20
|
-
ERROR,
|
21
|
-
{ br_spaces: 0 },
|
22
|
-
],
|
23
|
-
"markdownlint/md010": [
|
24
|
-
ERROR,
|
25
|
-
{ spaces_per_tab: 2 },
|
26
|
-
],
|
10
|
+
"markdownlint/md003": [ERROR, { style: "atx" }],
|
11
|
+
"markdownlint/md004": [ERROR, { style: "dash" }],
|
12
|
+
"markdownlint/md009": [ERROR, { br_spaces: 0 }],
|
13
|
+
"markdownlint/md010": [ERROR, { spaces_per_tab: 2 }],
|
27
14
|
"markdownlint/md013": OFF,
|
28
|
-
"markdownlint/md029": [
|
29
|
-
|
30
|
-
|
31
|
-
],
|
32
|
-
"markdownlint/
|
33
|
-
|
34
|
-
|
35
|
-
allowed_elements: [
|
36
|
-
"details",
|
37
|
-
"summary",
|
38
|
-
],
|
39
|
-
},
|
40
|
-
],
|
41
|
-
"markdownlint/md035": [
|
42
|
-
ERROR,
|
43
|
-
{ style: "---" },
|
44
|
-
],
|
45
|
-
"markdownlint/md046": [
|
46
|
-
ERROR,
|
47
|
-
{ style: "fenced" },
|
48
|
-
],
|
49
|
-
"markdownlint/md048": [
|
50
|
-
ERROR,
|
51
|
-
{ style: "backtick" },
|
52
|
-
],
|
53
|
-
"markdownlint/md049": [
|
54
|
-
ERROR,
|
55
|
-
{ style: "underscore" },
|
56
|
-
],
|
57
|
-
"markdownlint/md050": [
|
58
|
-
ERROR,
|
59
|
-
{ style: "underscore" },
|
60
|
-
],
|
15
|
+
"markdownlint/md029": [ERROR, { style: "one" }],
|
16
|
+
"markdownlint/md033": [ERROR, { allowed_elements: ["details", "summary"] }],
|
17
|
+
"markdownlint/md035": [ERROR, { style: "---" }],
|
18
|
+
"markdownlint/md046": [ERROR, { style: "fenced" }],
|
19
|
+
"markdownlint/md048": [ERROR, { style: "backtick" }],
|
20
|
+
"markdownlint/md049": [ERROR, { style: "underscore" }],
|
21
|
+
"markdownlint/md050": [ERROR, { style: "underscore" }],
|
61
22
|
},
|
62
23
|
] as const satisfies RuleEntry;
|
@@ -3,7 +3,5 @@ import { Strings, type RuleEntry } from "../index.js";
|
|
3
3
|
|
4
4
|
const { Id: { Recommended } } = Strings;
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
(mocha.configs.flat.recommended as Record<"rules", RuleEntry.Object>).rules, // Remove shared config once manually configured
|
9
|
-
] as const satisfies RuleEntry;
|
6
|
+
// Remove shared config once manually configured
|
7
|
+
export default [Recommended, (mocha.configs.flat.recommended as Record<"rules", RuleEntry.Object>).rules] as const satisfies RuleEntry;
|
@@ -2,13 +2,6 @@ import { Strings, type RuleEntry } from "../index.js";
|
|
2
2
|
|
3
3
|
const { Level: { OFF } } = Strings;
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
// Recommended by Svelte base config:
|
10
|
-
// http://github.com/sveltejs/eslint-plugin-svelte/tree/main/src/configs/flat
|
11
|
-
"no-inner-declarations": OFF, // ESLint Core
|
12
|
-
"no-self-assign": OFF, // ESLint Core
|
13
|
-
},
|
14
|
-
] as const satisfies RuleEntry;
|
5
|
+
// Recommended by Svelte base config:
|
6
|
+
// http://github.com/sveltejs/eslint-plugin-svelte/tree/main/src/configs/flat
|
7
|
+
export default ["disable-js", { "no-inner-declarations": OFF /* ESLint Core */, "no-self-assign": OFF /* ESLint Core */ }] as const satisfies RuleEntry;
|
@@ -2,10 +2,4 @@ import { Strings, type RuleEntry } from "../index.js";
|
|
2
2
|
|
3
3
|
const { Level: { OFF } } = Strings;
|
4
4
|
|
5
|
-
export default [
|
6
|
-
"disable-ts",
|
7
|
-
{
|
8
|
-
"no-unused-vars": OFF, // ESLint Core
|
9
|
-
"@typescript-eslint/no-unused-vars": OFF, // TS Extension
|
10
|
-
},
|
11
|
-
] as const satisfies RuleEntry;
|
5
|
+
export default ["disable-ts", { "no-unused-vars": OFF /* ESLint Core */, "@typescript-eslint/no-unused-vars": OFF /* TS Extension */ }] as const satisfies RuleEntry;
|
@@ -2,14 +2,5 @@ import { Strings, type RuleEntry } from "../index.js";
|
|
2
2
|
|
3
3
|
const { Id: { DisableX }, Level: { OFF } } = Strings;
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
{
|
8
|
-
|
9
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
|
10
|
-
"no-inner-declarations": OFF, // also disabled in SvelteDisableConflictJs per Svelte base config
|
11
|
-
|
12
|
-
// "@stylistic/no-trailing-spaces": OFF,
|
13
|
-
|
14
|
-
},
|
15
|
-
] as const satisfies RuleEntry;
|
5
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
|
6
|
+
export default [DisableX, { "no-inner-declarations": OFF /* also disabled in SvelteDisableConflictJs per Svelte base config */ }] as const satisfies RuleEntry;
|
@@ -14,8 +14,7 @@ const {
|
|
14
14
|
export default [
|
15
15
|
Enable,
|
16
16
|
{
|
17
|
-
|
18
|
-
// Possible Errors
|
17
|
+
// #region Possible Errors
|
19
18
|
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#possible-errors
|
20
19
|
"svelte/infinite-reactive-loop": ERROR,
|
21
20
|
"svelte/no-dom-manipulating": ERROR,
|
@@ -27,86 +26,46 @@ export default [
|
|
27
26
|
"svelte/no-export-load-in-svelte-module-in-kit-pages": ERROR,
|
28
27
|
"svelte/no-not-function-handler": ERROR,
|
29
28
|
"svelte/no-object-in-text-mustaches": ERROR,
|
30
|
-
"svelte/no-reactive-reassign": [
|
31
|
-
ERROR,
|
32
|
-
{ props: true },
|
33
|
-
],
|
29
|
+
"svelte/no-reactive-reassign": [ERROR, { props: true }],
|
34
30
|
"svelte/no-shorthand-style-property-overrides": ERROR,
|
35
31
|
"svelte/no-store-async": ERROR,
|
36
|
-
"svelte/no-unknown-style-directive-property": [
|
37
|
-
ERROR,
|
38
|
-
{
|
39
|
-
// ignoreProperties: [], // ESLint error if array empty
|
40
|
-
ignorePrefixed: true,
|
41
|
-
},
|
42
|
-
],
|
32
|
+
"svelte/no-unknown-style-directive-property": [ERROR, { ignorePrefixed: true }],
|
43
33
|
"svelte/require-store-callbacks-use-set-param": ERROR,
|
44
34
|
"svelte/require-store-reactive-access": ERROR,
|
45
|
-
"svelte/valid-compile": [
|
46
|
-
ERROR,
|
47
|
-
{ ignoreWarnings: false },
|
48
|
-
],
|
35
|
+
"svelte/valid-compile": [ERROR, { ignoreWarnings: false }],
|
49
36
|
"svelte/valid-prop-names-in-kit-pages": ERROR,
|
50
37
|
|
51
|
-
//
|
38
|
+
// #endregion
|
39
|
+
|
40
|
+
// #region Security
|
52
41
|
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#security-vulnerability
|
53
42
|
"svelte/no-at-html-tags": ERROR,
|
54
|
-
"svelte/no-target-blank": [
|
55
|
-
ERROR,
|
56
|
-
{
|
57
|
-
allowReferrer: false,
|
58
|
-
enforceDynamicLinks: ALWAYS,
|
59
|
-
},
|
60
|
-
],
|
43
|
+
"svelte/no-target-blank": [ERROR, { allowReferrer: false, enforceDynamicLinks: ALWAYS }],
|
61
44
|
|
62
|
-
//
|
45
|
+
// #endregion
|
46
|
+
|
47
|
+
// #region Best Practices
|
63
48
|
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#best-practices
|
64
49
|
"svelte/block-lang": [
|
65
50
|
ERROR,
|
66
51
|
{
|
67
|
-
enforceScriptPresent: true,
|
68
|
-
enforceStylePresent: false,
|
52
|
+
enforceScriptPresent: true,
|
53
|
+
enforceStylePresent: false,
|
69
54
|
script: ["ts"],
|
70
|
-
style: [
|
71
|
-
"css",
|
72
|
-
"scss",
|
73
|
-
],
|
74
|
-
},
|
75
|
-
],
|
76
|
-
"svelte/button-has-type": [
|
77
|
-
ERROR,
|
78
|
-
{
|
79
|
-
button: true,
|
80
|
-
submit: true,
|
81
|
-
reset: true,
|
55
|
+
style: ["css", "scss"],
|
82
56
|
},
|
83
|
-
],
|
57
|
+
], /* INVESTIGATE: */
|
58
|
+
"svelte/button-has-type": [ERROR, { button: true, submit: true, reset: true }],
|
84
59
|
"svelte/no-at-debug-tags": ERROR,
|
85
60
|
"svelte/no-ignored-unsubscribe": ERROR,
|
86
61
|
"svelte/no-immutable-reactive-statements": ERROR,
|
87
|
-
"svelte/no-inline-styles": [
|
88
|
-
ERROR,
|
89
|
-
{ allowTransitions: false },
|
90
|
-
],
|
62
|
+
"svelte/no-inline-styles": [ERROR, { allowTransitions: false }],
|
91
63
|
"svelte/no-reactive-functions": ERROR,
|
92
64
|
"svelte/no-reactive-literals": ERROR,
|
93
65
|
"svelte/no-svelte-internal": ERROR,
|
94
|
-
"svelte/no-unused-class-name": ERROR,
|
95
|
-
|
96
|
-
/*
|
97
|
-
"svelte/no-unused-class-name": [
|
98
|
-
ERROR,
|
99
|
-
{ allowedClassNames: [] },
|
100
|
-
],
|
101
|
-
*/
|
66
|
+
"svelte/no-unused-class-name": ERROR, /* BUG: ESLint error if array empty */
|
102
67
|
"svelte/no-unused-svelte-ignore": ERROR,
|
103
|
-
"svelte/no-useless-mustaches": [
|
104
|
-
ERROR,
|
105
|
-
{
|
106
|
-
ignoreIncludesComment: false,
|
107
|
-
ignoreStringEscape: false,
|
108
|
-
},
|
109
|
-
],
|
68
|
+
"svelte/no-useless-mustaches": [ERROR, { ignoreIncludesComment: false, ignoreStringEscape: false }],
|
110
69
|
"svelte/prefer-destructured-store-props": ERROR,
|
111
70
|
"svelte/require-each-key": ERROR,
|
112
71
|
"svelte/require-event-dispatcher-types": ERROR,
|
@@ -114,104 +73,58 @@ export default [
|
|
114
73
|
"svelte/require-stores-init": ERROR,
|
115
74
|
"svelte/valid-each-key": ERROR,
|
116
75
|
|
117
|
-
//
|
76
|
+
// #endregion
|
77
|
+
|
78
|
+
// #region Style
|
118
79
|
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#stylistic-issues
|
119
80
|
"svelte/derived-has-same-inputs-outputs": ERROR,
|
120
|
-
"svelte/first-attribute-linebreak": [
|
121
|
-
|
122
|
-
|
123
|
-
multiline: BELOW,
|
124
|
-
singleline: BELOW,
|
125
|
-
},
|
126
|
-
],
|
127
|
-
"svelte/html-closing-bracket-spacing": [
|
128
|
-
ERROR,
|
129
|
-
{
|
130
|
-
startTag: NEVER,
|
131
|
-
endTag: NEVER,
|
132
|
-
selfClosingTag: ALWAYS,
|
133
|
-
},
|
134
|
-
],
|
135
|
-
"svelte/html-quotes": [
|
136
|
-
ERROR,
|
137
|
-
{
|
138
|
-
prefer: DOUBLE,
|
139
|
-
dynamic: {
|
140
|
-
quoted: false,
|
141
|
-
avoidInvalidUnquotedInHTML: true,
|
142
|
-
},
|
143
|
-
},
|
144
|
-
],
|
81
|
+
"svelte/first-attribute-linebreak": [ERROR, { multiline: BELOW, singleline: BELOW }],
|
82
|
+
"svelte/html-closing-bracket-spacing": [ERROR, { startTag: NEVER, endTag: NEVER, selfClosingTag: ALWAYS }],
|
83
|
+
"svelte/html-quotes": [ERROR, { prefer: DOUBLE, dynamic: { quoted: false, avoidInvalidUnquotedInHTML: true } }],
|
145
84
|
"svelte/html-self-closing": [
|
146
85
|
ERROR,
|
147
86
|
{
|
148
|
-
"void": ALWAYS
|
149
|
-
normal: ALWAYS
|
150
|
-
component: ALWAYS
|
151
|
-
svelte: ALWAYS
|
152
|
-
},
|
153
|
-
],
|
154
|
-
"svelte/indent": [
|
155
|
-
ERROR,
|
156
|
-
{
|
157
|
-
indent: 2,
|
158
|
-
|
159
|
-
// ignoredNodes: [], // ESLint error if array empty
|
160
|
-
switchCase: 1,
|
161
|
-
alignAttributesVertically: true,
|
162
|
-
},
|
163
|
-
],
|
164
|
-
"svelte/max-attributes-per-line": [
|
165
|
-
ERROR,
|
166
|
-
{
|
167
|
-
multiline: 1,
|
168
|
-
singleline: 1,
|
87
|
+
"void": ALWAYS /* or NEVER or "ignore" */,
|
88
|
+
normal: ALWAYS /* or NEVER or "ignore" */,
|
89
|
+
component: ALWAYS /* or NEVER or "ignore" */,
|
90
|
+
svelte: ALWAYS /* or NEVER or "ignore" */,
|
169
91
|
},
|
170
92
|
],
|
93
|
+
"svelte/indent": [ERROR, { indent: 2, switchCase: 1, alignAttributesVertically: true }],
|
94
|
+
"svelte/max-attributes-per-line": [ERROR, { multiline: 1, singleline: 1 }],
|
171
95
|
"svelte/mustache-spacing": [
|
172
96
|
ERROR,
|
173
97
|
{
|
174
|
-
textExpressions: NEVER
|
175
|
-
attributesAndProps: NEVER
|
176
|
-
directiveExpressions: NEVER
|
177
|
-
tags: {
|
178
|
-
openingBrace: NEVER, // or ALWAYS
|
179
|
-
closingBrace: NEVER, // or ALWAYS or "always-after-expression"
|
180
|
-
},
|
98
|
+
textExpressions: NEVER /* or ALWAYS */,
|
99
|
+
attributesAndProps: NEVER /* or ALWAYS */,
|
100
|
+
directiveExpressions: NEVER /* or ALWAYS */,
|
101
|
+
tags: { openingBrace: NEVER /* or ALWAYS */, closingBrace: NEVER /* or ALWAYS or "always-after-expression" */ },
|
181
102
|
},
|
182
103
|
],
|
183
104
|
"svelte/no-extra-reactive-curlies": ERROR,
|
184
105
|
"svelte/no-restricted-html-elements": OFF,
|
185
106
|
"svelte/no-spaces-around-equal-signs-in-attribute": ERROR,
|
186
|
-
"svelte/prefer-class-directive": [
|
187
|
-
ERROR,
|
188
|
-
{ prefer: "empty" },
|
189
|
-
],
|
107
|
+
"svelte/prefer-class-directive": [ERROR, { prefer: "empty" }],
|
190
108
|
"svelte/prefer-style-directive": ERROR,
|
191
|
-
"svelte/shorthand-attribute": [
|
192
|
-
|
193
|
-
|
194
|
-
],
|
195
|
-
|
196
|
-
|
197
|
-
{ prefer: ALWAYS },
|
198
|
-
],
|
199
|
-
"svelte/sort-attributes": OFF, // TBD
|
200
|
-
"svelte/spaced-html-comment": [
|
201
|
-
ERROR,
|
202
|
-
ALWAYS, // or NEVER
|
203
|
-
],
|
109
|
+
"svelte/shorthand-attribute": [ERROR, { prefer: ALWAYS }],
|
110
|
+
"svelte/shorthand-directive": [ERROR, { prefer: ALWAYS }],
|
111
|
+
"svelte/sort-attributes": OFF, // INVESTIGATE:
|
112
|
+
"svelte/spaced-html-comment": [ERROR, ALWAYS],
|
113
|
+
|
114
|
+
// #endregion
|
204
115
|
|
205
|
-
// svelte-kit
|
116
|
+
// #region svelte-kit
|
206
117
|
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#svelte-kit
|
207
118
|
"svelte/no-goto-without-base": ERROR,
|
208
119
|
|
209
|
-
//
|
120
|
+
// #endregion
|
121
|
+
|
122
|
+
// #region System (REQUIRED)
|
210
123
|
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#system
|
211
|
-
"svelte/comment-directive": [
|
212
|
-
ERROR,
|
213
|
-
{ reportUnusedDisableDirectives: true },
|
214
|
-
],
|
124
|
+
"svelte/comment-directive": [ERROR, { reportUnusedDisableDirectives: true }],
|
215
125
|
"svelte/system": ERROR,
|
126
|
+
|
127
|
+
// #endregion
|
128
|
+
|
216
129
|
},
|
217
130
|
] as const satisfies RuleEntry;
|
@@ -1,24 +1,6 @@
|
|
1
1
|
import { Strings, type RuleEntry } from "../index.js";
|
2
2
|
|
3
|
-
const {
|
4
|
-
Id: { EnableX },
|
5
|
-
Level: { ERROR, OFF },
|
6
|
-
State: {
|
7
|
-
ALLOW,
|
8
|
-
BOTH,
|
9
|
-
},
|
10
|
-
} = Strings;
|
3
|
+
const { Id: { EnableX }, Level: { ERROR, OFF }, State: { ALLOW, BOTH } } = Strings;
|
11
4
|
|
12
|
-
|
13
|
-
|
14
|
-
{
|
15
|
-
|
16
|
-
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
|
17
|
-
"svelte/no-inner-declarations": [
|
18
|
-
ERROR,
|
19
|
-
BOTH,
|
20
|
-
{ blockScopedFunctions: ALLOW },
|
21
|
-
], /* Same options as in JsEnable */
|
22
|
-
"svelte/no-trailing-spaces": OFF, /* Only applies to HTML comments, which I don't intend to use: http://sveltejs.github.io/eslint-plugin-svelte/rules/no-trailing-spaces/ */
|
23
|
-
},
|
24
|
-
] as const satisfies RuleEntry;
|
5
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
|
6
|
+
export default [EnableX, { "svelte/no-inner-declarations": [ERROR, BOTH, { blockScopedFunctions: ALLOW }] /* Same options as in JsEnable */, "svelte/no-trailing-spaces": OFF /* Only applies to HTML comments, which I don't intend to use: http://sveltejs.github.io/eslint-plugin-svelte/rules/no-trailing-spaces/ */ }] as const satisfies RuleEntry;
|
@@ -5,7 +5,6 @@ const { Id: { DisableX }, Level: { OFF } } = Strings;
|
|
5
5
|
export default [
|
6
6
|
DisableX,
|
7
7
|
{
|
8
|
-
|
9
8
|
// https://typescript-eslint.io/rules/?=extension-xdeprecated#rules ]
|
10
9
|
"class-methods-use-this": OFF,
|
11
10
|
"consistent-return": OFF,
|
@@ -23,7 +22,7 @@ export default [
|
|
23
22
|
"no-redeclare": OFF,
|
24
23
|
"no-restricted-imports": OFF,
|
25
24
|
"no-shadow": OFF,
|
26
|
-
"no-throw-literal": OFF
|
25
|
+
"no-throw-literal": OFF /* @typescript-eslint/only-throw-error */,
|
27
26
|
"no-unused-expressions": OFF,
|
28
27
|
"no-unused-vars": OFF,
|
29
28
|
"no-use-before-define": OFF,
|