@citrus-linting/eslint-config 0.18.2 → 0.20.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/README.md +2 -2
- package/package.json +1 -1
- package/rules/base.js +1 -1
- package/rules/svelte.js +46 -24
- package/rules/typescript.js +6 -6
- package/svelte-typescript.js +1 -1
- package/svelte.js +1 -1
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ Add `extends` field to your ESLint config:
|
|
|
69
69
|
Install dependencies:
|
|
70
70
|
|
|
71
71
|
```sh
|
|
72
|
-
npm add -D svelte-eslint-parser
|
|
72
|
+
npm add -D svelte-eslint-parser eslint-plugin-svelte @citrus-linting/eslint-config
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
Add `extends` field to your ESLint config:
|
|
@@ -95,7 +95,7 @@ Add `extends` field to your ESLint config:
|
|
|
95
95
|
Install dependencies:
|
|
96
96
|
|
|
97
97
|
```sh
|
|
98
|
-
npm add -D svelte-eslint-parser
|
|
98
|
+
npm add -D svelte-eslint-parser eslint-plugin-svelte @typescript-eslint/parser @typescript-eslint/eslint-plugin @citrus-linting/eslint-config
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
Add `extends` field to your ESLint config:
|
package/package.json
CHANGED
package/rules/base.js
CHANGED
|
@@ -187,7 +187,7 @@ module.exports = {
|
|
|
187
187
|
"array-element-newline": [2, "consistent"],
|
|
188
188
|
"block-spacing": [2],
|
|
189
189
|
"brace-style": [2],
|
|
190
|
-
camelcase: [2],
|
|
190
|
+
camelcase: [2, { properties: "never" }],
|
|
191
191
|
// "capitalized-comments": [2],
|
|
192
192
|
"comma-dangle": [2],
|
|
193
193
|
"comma-spacing": [2],
|
package/rules/svelte.js
CHANGED
|
@@ -3,60 +3,82 @@ module.exports = {
|
|
|
3
3
|
/*
|
|
4
4
|
Possible Errors
|
|
5
5
|
*/
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
6
|
+
"svelte/no-dom-manipulating": 2,
|
|
7
|
+
"svelte/no-dupe-else-if-blocks": 2,
|
|
8
|
+
"svelte/no-dupe-style-properties": 2,
|
|
9
|
+
"svelte/no-dynamic-slot-name": 2,
|
|
10
|
+
"svelte/no-export-load-in-svelte-module-in-kit-pages": 2,
|
|
11
|
+
"svelte/no-not-function-handler": 2,
|
|
12
|
+
"svelte/no-object-in-text-mustaches": 2,
|
|
13
|
+
"svelte/no-shorthand-style-property-overrides": 2,
|
|
14
|
+
"svelte/no-store-async": 2,
|
|
15
|
+
"svelte/no-unknown-style-directive-property": [2],
|
|
16
|
+
"svelte/require-store-callbacks-use-set-param": 2,
|
|
17
|
+
"svelte/require-store-reactive-access": 2,
|
|
18
|
+
"svelte/valid-compile": [2],
|
|
19
|
+
"svelte/valid-prop-names-in-kit-pages": 2,
|
|
11
20
|
|
|
12
21
|
/*
|
|
13
22
|
Security Vulnerability
|
|
14
23
|
*/
|
|
15
|
-
"
|
|
16
|
-
"
|
|
24
|
+
"svelte/no-at-html-tags": 2,
|
|
25
|
+
"svelte/no-target-blank": [2],
|
|
17
26
|
|
|
18
27
|
/*
|
|
19
28
|
Best Practices
|
|
20
29
|
*/
|
|
21
|
-
// "
|
|
22
|
-
"
|
|
23
|
-
"
|
|
30
|
+
// "svelte/button-has-type": [2],
|
|
31
|
+
"svelte/no-at-debug-tags": 2,
|
|
32
|
+
"svelte/no-reactive-functions": 2,
|
|
33
|
+
"svelte/no-reactive-literals": 2,
|
|
34
|
+
"svelte/no-unused-svelte-ignore": 2,
|
|
35
|
+
"svelte/no-useless-mustaches": [2],
|
|
36
|
+
// "svelte/prefer-destructured-store-props": 2,
|
|
37
|
+
"svelte/require-optimized-style-attribute": 2,
|
|
38
|
+
"svelte/require-stores-init": 2,
|
|
24
39
|
|
|
25
40
|
/*
|
|
26
41
|
Stylistic Issues
|
|
27
42
|
*/
|
|
28
|
-
"
|
|
29
|
-
"
|
|
43
|
+
"svelte/derived-has-same-inputs-outputs": 2,
|
|
44
|
+
"svelte/first-attribute-linebreak": [2],
|
|
45
|
+
"svelte/html-closing-bracket-spacing": [2],
|
|
46
|
+
"svelte/html-quotes": [2],
|
|
47
|
+
"svelte/html-self-closing": [2],
|
|
30
48
|
indent: 0,
|
|
31
|
-
"
|
|
49
|
+
"svelte/indent": [
|
|
32
50
|
2,
|
|
33
51
|
{
|
|
34
52
|
indent: 4
|
|
35
53
|
}
|
|
36
54
|
],
|
|
37
|
-
// "
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
"
|
|
55
|
+
// "svelte/max-attributes-per-line": [2],
|
|
56
|
+
"svelte/mustache-spacing": [2],
|
|
57
|
+
"svelte/no-extra-reactive-curlies": 2,
|
|
58
|
+
"svelte/no-spaces-around-equal-signs-in-attribute": 2,
|
|
59
|
+
"svelte/prefer-class-directive": 2,
|
|
60
|
+
"svelte/prefer-style-directive": 2,
|
|
61
|
+
"svelte/shorthand-attribute": [2],
|
|
62
|
+
"svelte/shorthand-directive": [2],
|
|
63
|
+
"svelte/sort-attributes": [2],
|
|
64
|
+
"svelte/spaced-html-comment": [2],
|
|
42
65
|
|
|
43
66
|
/*
|
|
44
67
|
Extension Rules
|
|
45
68
|
*/
|
|
46
|
-
// "
|
|
69
|
+
// "svelte/no-inner-declarations": [2],
|
|
70
|
+
"svelte/no-trailing-spaces": [2],
|
|
47
71
|
|
|
48
72
|
/*
|
|
49
73
|
System
|
|
50
74
|
*/
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"@ota-meshi/svelte/system": 2,
|
|
75
|
+
"svelte/comment-directive": 2,
|
|
76
|
+
"svelte/system": 2,
|
|
54
77
|
|
|
55
78
|
/*
|
|
56
79
|
[other]
|
|
57
80
|
*/
|
|
58
81
|
"no-self-assign": 0,
|
|
59
|
-
"no-undef-init": 0
|
|
60
|
-
"@typescript-eslint/no-unnecessary-condition": 0
|
|
82
|
+
"no-undef-init": 0
|
|
61
83
|
}
|
|
62
84
|
}
|
package/rules/typescript.js
CHANGED
|
@@ -58,7 +58,7 @@ module.exports = {
|
|
|
58
58
|
"@typescript-eslint/no-var-requires": 2,
|
|
59
59
|
"@typescript-eslint/non-nullable-type-assertion-style": 2,
|
|
60
60
|
"@typescript-eslint/prefer-as-const": 2,
|
|
61
|
-
|
|
61
|
+
"@typescript-eslint/prefer-enum-initializers": 2,
|
|
62
62
|
"@typescript-eslint/prefer-function-type": 2,
|
|
63
63
|
"@typescript-eslint/prefer-includes": 2,
|
|
64
64
|
// "@typescript-eslint/prefer-literal-enum-member": [2],
|
|
@@ -206,22 +206,22 @@ module.exports = {
|
|
|
206
206
|
{
|
|
207
207
|
selector: "memberLike",
|
|
208
208
|
modifiers: ["private"],
|
|
209
|
-
format:
|
|
209
|
+
format: null,
|
|
210
210
|
leadingUnderscore: "require"
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
selector: "memberLike",
|
|
214
214
|
modifiers: ["protected"],
|
|
215
|
-
format:
|
|
215
|
+
format: null,
|
|
216
216
|
leadingUnderscore: "require"
|
|
217
217
|
},
|
|
218
218
|
{
|
|
219
|
-
selector: "typeLike",
|
|
219
|
+
selector: ["enumMember", "typeLike"],
|
|
220
220
|
format: ["PascalCase"]
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
|
-
selector: "
|
|
224
|
-
format:
|
|
223
|
+
selector: ["objectLiteralProperty", "typeProperty"],
|
|
224
|
+
format: null
|
|
225
225
|
}
|
|
226
226
|
],
|
|
227
227
|
"no-shadow": 0,
|
package/svelte-typescript.js
CHANGED