linted 16.12.2-rc.0 → 16.12.2-rc.2
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/workflows/RELEASE.yml +35 -35
- package/.github/workflows/rc.yml +35 -35
- package/LICENSE +21 -21
- package/README.md +390 -390
- package/SECURITY.md +9 -9
- package/dist/imports/plugins.d.ts.map +1 -1
- package/dist/imports.d.ts.map +1 -1
- package/dist/rules/html/enable.d.ts +8 -0
- package/dist/rules/html/enable.d.ts.map +1 -0
- package/dist/rules/html/enable.js +15 -0
- package/dist/rules/html/enable.js.map +1 -0
- package/dist/rules/html/enable_recommended.d.ts +3 -0
- package/dist/rules/html/enable_recommended.d.ts.map +1 -0
- package/dist/rules/html/enable_recommended.js +8 -0
- package/dist/rules/html/enable_recommended.js.map +1 -0
- package/dist/rules/html.d.ts +8 -0
- package/dist/rules/html.d.ts.map +1 -0
- package/dist/rules/html.js +4 -0
- package/dist/rules/html.js.map +1 -0
- package/dist/rules/js/enable.d.ts +348 -0
- package/dist/rules/js/enable.d.ts.map +1 -0
- package/dist/rules/js/enable.js +496 -0
- package/dist/rules/js/enable.js.map +1 -0
- package/dist/rules/js/enable_stylistic.d.ts +420 -0
- package/dist/rules/js/enable_stylistic.d.ts.map +1 -0
- package/dist/rules/js/enable_stylistic.js +585 -0
- package/dist/rules/js/enable_stylistic.js.map +1 -0
- package/dist/rules/js.d.ts +765 -0
- package/dist/rules/js.d.ts.map +1 -0
- package/dist/rules/js.js +4 -0
- package/dist/rules/js.js.map +1 -0
- package/dist/rules/json/enable.d.ts +27 -0
- package/dist/rules/json/enable.d.ts.map +1 -0
- package/dist/rules/json/enable.js +31 -0
- package/dist/rules/json/enable.js.map +1 -0
- package/dist/rules/json/enable_x.d.ts.map +1 -1
- package/dist/rules/json/enable_x.js +48 -8
- package/dist/rules/json/enable_x.js.map +1 -1
- package/dist/rules/json.d.ts +74 -0
- package/dist/rules/json.d.ts.map +1 -0
- package/dist/rules/json.js +4 -0
- package/dist/rules/json.js.map +1 -0
- package/dist/rules/jsonc/override.d.ts.map +1 -1
- package/dist/rules/jsonc/override.js +12 -3
- package/dist/rules/jsonc/override.js.map +1 -1
- package/dist/rules/jsonc.d.ts +77 -0
- package/dist/rules/jsonc.d.ts.map +1 -0
- package/dist/rules/jsonc.js +4 -0
- package/dist/rules/jsonc.js.map +1 -0
- package/dist/rules/md/enable.d.ts +7 -0
- package/dist/rules/md/enable.d.ts.map +1 -0
- package/dist/rules/md/enable.js +14 -0
- package/dist/rules/md/enable.js.map +1 -0
- package/dist/rules/md.d.ts +7 -0
- package/dist/rules/md.d.ts.map +1 -0
- package/dist/rules/md.js +3 -0
- package/dist/rules/md.js.map +1 -0
- package/dist/rules/mocha/enable.d.ts +3 -0
- package/dist/rules/mocha/enable.d.ts.map +1 -0
- package/dist/rules/mocha/enable.js +3 -0
- package/dist/rules/mocha/enable.js.map +1 -0
- package/dist/rules/mocha/enable_recommended.d.ts +3 -0
- package/dist/rules/mocha/enable_recommended.d.ts.map +1 -0
- package/dist/rules/mocha/enable_recommended.js +8 -0
- package/dist/rules/mocha/enable_recommended.js.map +1 -0
- package/dist/rules/mocha.d.ts +8 -0
- package/dist/rules/mocha.d.ts.map +1 -0
- package/dist/rules/mocha.js +4 -0
- package/dist/rules/mocha.js.map +1 -0
- package/dist/rules/svelte/disable.d.ts +5 -0
- package/dist/rules/svelte/disable.d.ts.map +1 -0
- package/dist/rules/svelte/disable.js +8 -0
- package/dist/rules/svelte/disable.js.map +1 -0
- package/dist/rules/svelte/disable_js.d.ts.map +1 -1
- package/dist/rules/svelte/disable_js.js +8 -3
- package/dist/rules/svelte/disable_js.js.map +1 -1
- package/dist/rules/svelte/disable_ts.d.ts.map +1 -1
- package/dist/rules/svelte/disable_ts.js +8 -3
- package/dist/rules/svelte/disable_ts.js.map +1 -1
- package/dist/rules/svelte/enable.d.ts +126 -0
- package/dist/rules/svelte/enable.d.ts.map +1 -0
- package/dist/rules/svelte/enable.js +190 -0
- package/dist/rules/svelte/enable.js.map +1 -0
- package/dist/rules/svelte/enable_x.d.ts.map +1 -1
- package/dist/rules/svelte/enable_x.js +15 -3
- package/dist/rules/svelte/enable_x.js.map +1 -1
- package/dist/rules/svelte.d.ts +1269 -0
- package/dist/rules/svelte.d.ts.map +1 -0
- package/dist/rules/svelte.js +15 -0
- package/dist/rules/svelte.js.map +1 -0
- package/dist/rules/ts/disable.d.ts +18 -0
- package/dist/rules/ts/disable.d.ts.map +1 -0
- package/dist/rules/ts/disable.js +21 -0
- package/dist/rules/ts/disable.js.map +1 -0
- package/dist/rules/ts/disable_x.d.ts.map +1 -1
- package/dist/rules/ts/disable_x.js +1 -2
- package/dist/rules/ts/disable_x.js.map +1 -1
- package/dist/rules/ts/enable.d.ts +262 -0
- package/dist/rules/ts/enable.d.ts.map +1 -0
- package/dist/rules/ts/enable.js +503 -0
- package/dist/rules/ts/enable.js.map +1 -0
- package/dist/rules/ts/enable_x.d.ts.map +1 -1
- package/dist/rules/ts/enable_x.js +32 -5
- package/dist/rules/ts/enable_x.js.map +1 -1
- package/dist/rules/ts.d.ts +1133 -0
- package/dist/rules/ts.d.ts.map +1 -0
- package/dist/rules/ts.js +13 -0
- package/dist/rules/ts.js.map +1 -0
- package/dist/rules/yml/enable.d.ts +39 -0
- package/dist/rules/yml/enable.d.ts.map +1 -0
- package/dist/rules/yml/enable.js +60 -0
- package/dist/rules/yml/enable.js.map +1 -0
- package/dist/rules/yml/enable_x.d.ts.map +1 -1
- package/dist/rules/yml/enable_x.js +57 -9
- package/dist/rules/yml/enable_x.js.map +1 -1
- package/dist/rules/yml.d.ts +73 -0
- package/dist/rules/yml.d.ts.map +1 -0
- package/dist/rules/yml.js +4 -0
- package/dist/rules/yml.js.map +1 -0
- package/dist/rules.d.ts +75 -75
- package/dist/rules.js +9 -9
- package/dist/rules.js.map +1 -1
- package/eslint.config.js +3 -3
- package/package.json +99 -99
- package/src/files/html.ts +1 -1
- package/src/files/js.ts +1 -1
- package/src/files/json.ts +1 -1
- package/src/files/jsonc.ts +4 -4
- package/src/files/md.ts +1 -1
- package/src/files/mocha.ts +1 -1
- package/src/files/svelte.ts +1 -1
- package/src/files/ts.ts +5 -5
- package/src/files/yml.ts +5 -5
- package/src/files.ts +22 -22
- package/src/imports/parsers.ts +15 -15
- package/src/imports/plugins.ts +19 -19
- package/src/imports.ts +8 -8
- package/src/index.ts +36 -36
- package/src/rules/_strings/id.ts +18 -18
- package/src/rules/_strings/level.ts +6 -6
- package/src/rules/_strings/state.ts +56 -56
- package/src/rules/_strings.ts +6 -6
- package/src/rules/html/enable.ts +16 -0
- package/src/rules/html/enable_recommended.ts +9 -0
- package/src/rules/html.ts +4 -0
- package/src/rules/js/enable.ts +524 -0
- package/src/rules/js/enable_stylistic.ts +608 -0
- package/src/rules/js.ts +4 -0
- package/src/rules/json/{_enable.ts → enable.ts} +33 -35
- package/src/rules/json/enable_x.ts +89 -50
- package/src/rules/{_json.ts → json.ts} +4 -4
- package/src/rules/jsonc/override.ts +16 -9
- package/src/rules/{_jsonc.ts → jsonc.ts} +4 -4
- package/src/rules/md/enable.ts +15 -0
- package/src/rules/md.ts +3 -0
- package/src/rules/mocha/enable.ts +3 -0
- package/src/rules/mocha/enable_recommended.ts +9 -0
- package/src/rules/mocha.ts +4 -0
- package/src/rules/svelte/disable.ts +9 -0
- package/src/rules/svelte/disable_js.ts +11 -7
- package/src/rules/svelte/disable_ts.ts +9 -5
- package/src/rules/svelte/{_enable.ts → enable.ts} +228 -129
- package/src/rules/svelte/enable_x.ts +20 -9
- package/src/rules/{_svelte.ts → svelte.ts} +15 -15
- package/src/rules/ts/{disable_compiler.ts → disable.ts} +22 -23
- package/src/rules/ts/disable_x.ts +32 -36
- package/src/rules/ts/{_enable.ts → enable.ts} +549 -406
- package/src/rules/ts/enable_x.ts +115 -90
- package/src/rules/{_ts.ts → ts.ts} +13 -13
- package/src/rules/yml/{_enable.ts → enable.ts} +64 -33
- package/src/rules/yml/enable_x.ts +68 -21
- package/src/rules/{_yml.ts → yml.ts} +4 -4
- package/src/rules.ts +22 -22
- package/tsconfig.json +161 -161
- package/types/markdownlint/index.d.ts +3 -3
- package/types/markdownlint/parser.d.ts +9 -9
- package/types/mocha/index.d.ts +8 -8
- package/src/rules/_html.ts +0 -4
- package/src/rules/_js.ts +0 -4
- package/src/rules/_md.ts +0 -3
- package/src/rules/_mocha.ts +0 -4
- package/src/rules/html/_enable.ts +0 -13
- package/src/rules/html/_recommended.ts +0 -7
- package/src/rules/js/_enable.ts +0 -287
- package/src/rules/js/stylistic.ts +0 -294
- package/src/rules/md/_enable.ts +0 -14
- package/src/rules/mocha/_enable.ts +0 -5
- package/src/rules/mocha/_recommended.ts +0 -7
- package/src/rules/svelte/disable_x.ts +0 -8
@@ -1,50 +1,89 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
const
|
4
|
-
{
|
5
|
-
{
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
"jsonc/array-bracket-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
"jsonc/
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
"jsonc/no-
|
41
|
-
"jsonc/no-
|
42
|
-
"jsonc/no-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
1
|
+
import { enable_x, level, state } from "../_strings.js";
|
2
|
+
|
3
|
+
const
|
4
|
+
{ ERROR } = level,
|
5
|
+
{
|
6
|
+
Never,
|
7
|
+
Always,
|
8
|
+
Consistent,
|
9
|
+
Strict,
|
10
|
+
Last,
|
11
|
+
Double,
|
12
|
+
} = state;
|
13
|
+
|
14
|
+
export default [
|
15
|
+
enable_x,
|
16
|
+
{
|
17
|
+
// https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#extension-rules
|
18
|
+
"jsonc/array-bracket-newline": [ERROR, Consistent],
|
19
|
+
"jsonc/array-bracket-spacing": [
|
20
|
+
ERROR,
|
21
|
+
Never,
|
22
|
+
{
|
23
|
+
singleValue: false,
|
24
|
+
objectsInArrays: false,
|
25
|
+
arraysInArrays: false,
|
26
|
+
},
|
27
|
+
],
|
28
|
+
"jsonc/array-element-newline": [ERROR, Always],
|
29
|
+
"jsonc/comma-dangle": [ERROR, Never] /* trailing commas are NOT allowed in JSON */,
|
30
|
+
"jsonc/comma-style": [ERROR, Last],
|
31
|
+
"jsonc/indent": [ERROR, 2],
|
32
|
+
"jsonc/key-spacing": [
|
33
|
+
ERROR,
|
34
|
+
{
|
35
|
+
beforeColon: false,
|
36
|
+
afterColon: true,
|
37
|
+
mode: Strict,
|
38
|
+
},
|
39
|
+
],
|
40
|
+
"jsonc/no-dupe-keys": ERROR,
|
41
|
+
"jsonc/no-floating-decimal": ERROR,
|
42
|
+
"jsonc/no-irregular-whitespace": [
|
43
|
+
ERROR,
|
44
|
+
{
|
45
|
+
skipStrings: true,
|
46
|
+
skipComments: true,
|
47
|
+
skipRegExps: true,
|
48
|
+
skipTemplates: true,
|
49
|
+
skipJSXText: true,
|
50
|
+
},
|
51
|
+
],
|
52
|
+
"jsonc/no-multi-str": ERROR,
|
53
|
+
"jsonc/no-octal-escape": ERROR,
|
54
|
+
"jsonc/no-octal": ERROR,
|
55
|
+
"jsonc/no-sparse-arrays": ERROR,
|
56
|
+
"jsonc/no-useless-escape": ERROR,
|
57
|
+
"jsonc/object-curly-newline": [
|
58
|
+
ERROR,
|
59
|
+
{
|
60
|
+
consistent: true,
|
61
|
+
multiline: true,
|
62
|
+
minProperties: 2,
|
63
|
+
},
|
64
|
+
],
|
65
|
+
"jsonc/object-curly-spacing": [
|
66
|
+
ERROR,
|
67
|
+
Always,
|
68
|
+
{
|
69
|
+
arraysInObjects: true,
|
70
|
+
objectsInObjects: true,
|
71
|
+
},
|
72
|
+
],
|
73
|
+
"jsonc/object-property-newline": [
|
74
|
+
ERROR,
|
75
|
+
{
|
76
|
+
allowAllPropertiesOnSameLine: false,
|
77
|
+
},
|
78
|
+
],
|
79
|
+
"jsonc/quote-props": [ERROR, Always],
|
80
|
+
"jsonc/quotes": [
|
81
|
+
ERROR,
|
82
|
+
Double,
|
83
|
+
{
|
84
|
+
avoidEscape: false,
|
85
|
+
},
|
86
|
+
],
|
87
|
+
"jsonc/space-unary-ops": ERROR,
|
88
|
+
},
|
89
|
+
] as const;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import EnableX from "./json/enable_x.js";
|
2
|
-
import Enable from "./json/
|
3
|
-
|
4
|
-
export default [EnableX, Enable] as const;
|
1
|
+
import EnableX from "./json/enable_x.js";
|
2
|
+
import Enable from "./json/enable.js";
|
3
|
+
|
4
|
+
export default [EnableX, Enable] as const;
|
@@ -1,9 +1,16 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
const
|
4
|
-
{
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
import { override, level, state } from "../_strings.js";
|
2
|
+
|
3
|
+
const { ERROR, OFF } = level,
|
4
|
+
{ AlwaysMultiline } = state;
|
5
|
+
|
6
|
+
export default [
|
7
|
+
override,
|
8
|
+
{
|
9
|
+
// https://ota-meshi.github.io/eslint-plugin-jsonc/rules/#jsonc-rules
|
10
|
+
"jsonc/no-comments": OFF /* comments ARE allowed in JSONC */,
|
11
|
+
"jsonc/comma-dangle": [
|
12
|
+
ERROR,
|
13
|
+
AlwaysMultiline,
|
14
|
+
] /* trailing commas ARE allowed in JSONC */,
|
15
|
+
},
|
16
|
+
] as const;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import Json from "./
|
2
|
-
import OverrideJson from "./jsonc/override.js";
|
3
|
-
|
4
|
-
export default [...Json, OverrideJson] as const;
|
1
|
+
import Json from "./json.js";
|
2
|
+
import OverrideJson from "./jsonc/override.js";
|
3
|
+
|
4
|
+
export default [...Json, OverrideJson] as const;
|
package/src/rules/md.ts
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
import { recommended } from "../_strings.js";
|
2
|
+
import mocha from "eslint-plugin-mocha";
|
3
|
+
|
4
|
+
// REMOVE shared config once manually configured
|
5
|
+
export default [
|
6
|
+
recommended,
|
7
|
+
(mocha.configs.flat.recommended as Record<"rules", Record<string, "off">>)
|
8
|
+
.rules,
|
9
|
+
] as const;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { disable, OFF } from "../_strings.js";
|
2
|
+
|
3
|
+
export default [
|
4
|
+
disable,
|
5
|
+
{
|
6
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#extension-rules
|
7
|
+
"no-inner-declarations": OFF /* also disabled in SvelteDisableConflictJs per Svelte base config */,
|
8
|
+
},
|
9
|
+
] as const;
|
@@ -1,7 +1,11 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
//
|
7
|
-
|
1
|
+
import { OFF } from "../_strings.js";
|
2
|
+
|
3
|
+
export default [
|
4
|
+
"disable-js",
|
5
|
+
{
|
6
|
+
// Recommended by Svelte base config
|
7
|
+
// http://github.com/sveltejs/eslint-plugin-svelte/tree/main/src/configs/flat
|
8
|
+
"no-inner-declarations": OFF /* ESLint Core */,
|
9
|
+
"no-self-assign": OFF /* ESLint Core */,
|
10
|
+
},
|
11
|
+
] as const;
|
@@ -1,5 +1,9 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
import { OFF } from "../_strings.js";
|
2
|
+
|
3
|
+
export default [
|
4
|
+
"disable-ts",
|
5
|
+
{
|
6
|
+
"no-unused-vars": OFF /* ESLint Core */,
|
7
|
+
"@typescript-eslint/no-unused-vars": OFF /* TS Extension */,
|
8
|
+
},
|
9
|
+
] as const;
|
@@ -1,129 +1,228 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
const
|
4
|
-
{
|
5
|
-
{
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
//
|
17
|
-
|
18
|
-
"svelte/
|
19
|
-
"svelte/no-
|
20
|
-
"svelte/no-dupe-
|
21
|
-
"svelte/no-dupe-
|
22
|
-
"svelte/no-dupe-
|
23
|
-
"svelte/no-
|
24
|
-
"svelte/no-
|
25
|
-
"svelte/no-
|
26
|
-
"svelte/no-
|
27
|
-
"svelte/no-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
"svelte/
|
34
|
-
"svelte/
|
35
|
-
"svelte/
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
"svelte/
|
42
|
-
"svelte/
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
"svelte/
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
"svelte/
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
"svelte/
|
110
|
-
"svelte/
|
111
|
-
"svelte/
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
//
|
117
|
-
|
118
|
-
|
119
|
-
//
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
1
|
+
import { enable, level, state } from "../_strings.js";
|
2
|
+
|
3
|
+
const
|
4
|
+
{ ERROR, OFF } = level,
|
5
|
+
{
|
6
|
+
Never,
|
7
|
+
Always,
|
8
|
+
Below,
|
9
|
+
Double,
|
10
|
+
} = state;
|
11
|
+
|
12
|
+
export default [
|
13
|
+
enable,
|
14
|
+
{
|
15
|
+
// #region Possible Errors
|
16
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#possible-errors
|
17
|
+
"svelte/infinite-reactive-loop": ERROR,
|
18
|
+
"svelte/no-dom-manipulating": ERROR,
|
19
|
+
"svelte/no-dupe-else-if-blocks": ERROR,
|
20
|
+
"svelte/no-dupe-on-directives": ERROR,
|
21
|
+
"svelte/no-dupe-style-properties": ERROR,
|
22
|
+
"svelte/no-dupe-use-directives": ERROR,
|
23
|
+
"svelte/no-dynamic-slot-name": ERROR,
|
24
|
+
"svelte/no-export-load-in-svelte-module-in-kit-pages": ERROR,
|
25
|
+
"svelte/no-not-function-handler": ERROR,
|
26
|
+
"svelte/no-object-in-text-mustaches": ERROR,
|
27
|
+
"svelte/no-reactive-reassign": [
|
28
|
+
ERROR,
|
29
|
+
{
|
30
|
+
props: true,
|
31
|
+
},
|
32
|
+
],
|
33
|
+
"svelte/no-shorthand-style-property-overrides": ERROR,
|
34
|
+
"svelte/no-store-async": ERROR,
|
35
|
+
"svelte/no-unknown-style-directive-property": [
|
36
|
+
ERROR,
|
37
|
+
{
|
38
|
+
ignorePrefixed: true,
|
39
|
+
},
|
40
|
+
],
|
41
|
+
"svelte/require-store-callbacks-use-set-param": ERROR,
|
42
|
+
"svelte/require-store-reactive-access": ERROR,
|
43
|
+
"svelte/valid-compile": [
|
44
|
+
ERROR,
|
45
|
+
{
|
46
|
+
ignoreWarnings: false,
|
47
|
+
},
|
48
|
+
],
|
49
|
+
"svelte/valid-prop-names-in-kit-pages": ERROR,
|
50
|
+
|
51
|
+
// #endregion
|
52
|
+
|
53
|
+
// #region Security
|
54
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#security-vulnerability
|
55
|
+
"svelte/no-at-html-tags": ERROR,
|
56
|
+
"svelte/no-target-blank": [
|
57
|
+
ERROR,
|
58
|
+
{
|
59
|
+
allowReferrer: false,
|
60
|
+
enforceDynamicLinks: Always,
|
61
|
+
},
|
62
|
+
],
|
63
|
+
|
64
|
+
// #endregion
|
65
|
+
|
66
|
+
// #region Best Practices
|
67
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#best-practices
|
68
|
+
"svelte/block-lang": [
|
69
|
+
ERROR,
|
70
|
+
{
|
71
|
+
enforceScriptPresent: true,
|
72
|
+
enforceStylePresent: false,
|
73
|
+
script: ["ts"],
|
74
|
+
style: [
|
75
|
+
"css",
|
76
|
+
"scss",
|
77
|
+
],
|
78
|
+
},
|
79
|
+
], /* INVESTIGATE: */
|
80
|
+
"svelte/button-has-type": [
|
81
|
+
ERROR,
|
82
|
+
{
|
83
|
+
button: true,
|
84
|
+
submit: true,
|
85
|
+
reset: true,
|
86
|
+
},
|
87
|
+
],
|
88
|
+
"svelte/no-at-debug-tags": ERROR,
|
89
|
+
"svelte/no-ignored-unsubscribe": ERROR,
|
90
|
+
"svelte/no-immutable-reactive-statements": ERROR,
|
91
|
+
"svelte/no-inline-styles": [
|
92
|
+
ERROR,
|
93
|
+
{
|
94
|
+
allowTransitions: false,
|
95
|
+
},
|
96
|
+
],
|
97
|
+
"svelte/no-reactive-functions": ERROR,
|
98
|
+
"svelte/no-reactive-literals": ERROR,
|
99
|
+
"svelte/no-svelte-internal": ERROR,
|
100
|
+
"svelte/no-unused-class-name": ERROR, /* BUG: ESLint error if array empty */
|
101
|
+
"svelte/no-unused-svelte-ignore": ERROR,
|
102
|
+
"svelte/no-useless-mustaches": [
|
103
|
+
ERROR,
|
104
|
+
{
|
105
|
+
ignoreIncludesComment: false,
|
106
|
+
ignoreStringEscape: false,
|
107
|
+
},
|
108
|
+
],
|
109
|
+
"svelte/prefer-destructured-store-props": ERROR,
|
110
|
+
"svelte/require-each-key": ERROR,
|
111
|
+
"svelte/require-event-dispatcher-types": ERROR,
|
112
|
+
"svelte/require-optimized-style-attribute": ERROR,
|
113
|
+
"svelte/require-stores-init": ERROR,
|
114
|
+
"svelte/valid-each-key": ERROR,
|
115
|
+
|
116
|
+
// #endregion
|
117
|
+
|
118
|
+
// #region Style
|
119
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#stylistic-issues
|
120
|
+
"svelte/derived-has-same-inputs-outputs": ERROR,
|
121
|
+
"svelte/first-attribute-linebreak": [
|
122
|
+
ERROR,
|
123
|
+
{
|
124
|
+
multiline: Below,
|
125
|
+
singleline: Below,
|
126
|
+
},
|
127
|
+
],
|
128
|
+
"svelte/html-closing-bracket-spacing": [
|
129
|
+
ERROR,
|
130
|
+
{
|
131
|
+
startTag: Never,
|
132
|
+
endTag: Never,
|
133
|
+
selfClosingTag: Always,
|
134
|
+
},
|
135
|
+
],
|
136
|
+
"svelte/html-quotes": [
|
137
|
+
ERROR,
|
138
|
+
{
|
139
|
+
prefer: Double,
|
140
|
+
dynamic: {
|
141
|
+
quoted: false,
|
142
|
+
avoidInvalidUnquotedInHTML: true,
|
143
|
+
},
|
144
|
+
},
|
145
|
+
],
|
146
|
+
"svelte/html-self-closing": [
|
147
|
+
ERROR,
|
148
|
+
{
|
149
|
+
"void": Always /* or NEVER or "ignore" */,
|
150
|
+
normal: Always /* or NEVER or "ignore" */,
|
151
|
+
component: Always /* or NEVER or "ignore" */,
|
152
|
+
svelte: Always /* or NEVER or "ignore" */,
|
153
|
+
},
|
154
|
+
],
|
155
|
+
"svelte/indent": [
|
156
|
+
ERROR,
|
157
|
+
{
|
158
|
+
indent: 2,
|
159
|
+
switchCase: 1,
|
160
|
+
alignAttributesVertically: true,
|
161
|
+
},
|
162
|
+
],
|
163
|
+
"svelte/max-attributes-per-line": [
|
164
|
+
ERROR,
|
165
|
+
{
|
166
|
+
multiline: 1,
|
167
|
+
singleline: 1,
|
168
|
+
},
|
169
|
+
],
|
170
|
+
"svelte/mustache-spacing": [
|
171
|
+
ERROR,
|
172
|
+
{
|
173
|
+
textExpressions: Never /* or ALWAYS */,
|
174
|
+
attributesAndProps: Never /* or ALWAYS */,
|
175
|
+
directiveExpressions: Never /* or ALWAYS */,
|
176
|
+
tags: {
|
177
|
+
openingBrace: Never /* or ALWAYS */,
|
178
|
+
closingBrace: Never /* or ALWAYS or "always-after-expression" */,
|
179
|
+
},
|
180
|
+
},
|
181
|
+
],
|
182
|
+
"svelte/no-extra-reactive-curlies": ERROR,
|
183
|
+
"svelte/no-restricted-html-elements": OFF,
|
184
|
+
"svelte/no-spaces-around-equal-signs-in-attribute": ERROR,
|
185
|
+
"svelte/prefer-class-directive": [
|
186
|
+
ERROR,
|
187
|
+
{
|
188
|
+
prefer: "empty",
|
189
|
+
},
|
190
|
+
],
|
191
|
+
"svelte/prefer-style-directive": ERROR,
|
192
|
+
"svelte/shorthand-attribute": [
|
193
|
+
ERROR,
|
194
|
+
{
|
195
|
+
prefer: Always,
|
196
|
+
},
|
197
|
+
],
|
198
|
+
"svelte/shorthand-directive": [
|
199
|
+
ERROR,
|
200
|
+
{
|
201
|
+
prefer: Always,
|
202
|
+
},
|
203
|
+
],
|
204
|
+
"svelte/sort-attributes": OFF /* INVESTIGATE: */,
|
205
|
+
"svelte/spaced-html-comment": [ERROR, Always],
|
206
|
+
|
207
|
+
// #endregion
|
208
|
+
|
209
|
+
// #region svelte-kit
|
210
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#svelte-kit
|
211
|
+
"svelte/no-goto-without-base": ERROR,
|
212
|
+
|
213
|
+
// #endregion
|
214
|
+
|
215
|
+
// #region System (REQUIRED)
|
216
|
+
// http://sveltejs.github.io/eslint-plugin-svelte/rules/#system
|
217
|
+
"svelte/comment-directive": [
|
218
|
+
ERROR,
|
219
|
+
{
|
220
|
+
reportUnusedDisableDirectives: true,
|
221
|
+
},
|
222
|
+
],
|
223
|
+
"svelte/system": ERROR,
|
224
|
+
|
225
|
+
// #endregion
|
226
|
+
|
227
|
+
},
|
228
|
+
] as const;
|