eslint-config-azuriru 3.1.5 → 3.2.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/index.js +5 -3
- package/package.json +1 -1
- package/svelte.js +39 -17
package/index.js
CHANGED
|
@@ -5,6 +5,8 @@ import stylistic from '@stylistic/eslint-plugin';
|
|
|
5
5
|
import { plugin as tslint, parser } from 'typescript-eslint';
|
|
6
6
|
import { defineConfig } from 'eslint/config';
|
|
7
7
|
|
|
8
|
+
export { default as svelte } from './svelte';
|
|
9
|
+
|
|
8
10
|
export default defineConfig(
|
|
9
11
|
{
|
|
10
12
|
languageOptions: {
|
|
@@ -77,7 +79,7 @@ export default defineConfig(
|
|
|
77
79
|
'import/no-relative-parent-imports': 'off',
|
|
78
80
|
'import/no-restricted-paths': 'off',
|
|
79
81
|
'import/no-self-import': 'warn',
|
|
80
|
-
'import/no-unresolved': '
|
|
82
|
+
'import/no-unresolved': 'off', // I think ts already does this but sure // stupid shit doesn't even work with eslint/config
|
|
81
83
|
'import/no-useless-path-segments': 'warn',
|
|
82
84
|
'import/no-webpack-loader-syntax': 'warn',
|
|
83
85
|
|
|
@@ -85,7 +87,7 @@ export default defineConfig(
|
|
|
85
87
|
'import/consistent-type-specifier-style': 'off', // I should configure this later
|
|
86
88
|
'import/dynamic-import-chunkname': 'warn',
|
|
87
89
|
'import/exports-last': 'off',
|
|
88
|
-
'import/extensions': '
|
|
90
|
+
'import/extensions': 'off', // Generally, you don't need to // .config.js exception but meh
|
|
89
91
|
'import/first': 'warn',
|
|
90
92
|
'import/group-exports': 'off', // No way
|
|
91
93
|
|
|
@@ -326,7 +328,7 @@ export default defineConfig(
|
|
|
326
328
|
'@stylistic/line-comment-position': 'off', // Subjective.
|
|
327
329
|
'@stylistic/linebreak-style': [
|
|
328
330
|
'warn',
|
|
329
|
-
'
|
|
331
|
+
'unix'
|
|
330
332
|
],
|
|
331
333
|
'@stylistic/lines-around-comment': 'off',
|
|
332
334
|
'@stylistic/lines-between-class-members': [
|
package/package.json
CHANGED
package/svelte.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import svelte from 'eslint-plugin-svelte';
|
|
2
|
-
import tslint from 'typescript-eslint';
|
|
3
|
-
import parser from 'svelte-eslint-parser';
|
|
4
2
|
import { defineConfig } from 'eslint/config';
|
|
3
|
+
import parser from 'svelte-eslint-parser';
|
|
4
|
+
import tslint from 'typescript-eslint';
|
|
5
5
|
|
|
6
6
|
export default (svelteConfig) => {
|
|
7
7
|
return defineConfig(
|
|
@@ -28,14 +28,15 @@ export default (svelteConfig) => {
|
|
|
28
28
|
'svelte/no-dupe-on-directives': 'warn',
|
|
29
29
|
'svelte/no-dupe-style-properties': 'warn',
|
|
30
30
|
'svelte/no-dupe-use-directives': 'warn',
|
|
31
|
-
'svelte/no-dynamic-slot-name': 'warn',
|
|
32
|
-
'svelte/no-export-load-in-svelte-module-in-kit-pages': 'warn',
|
|
33
31
|
'svelte/no-not-function-handler': 'warn',
|
|
34
32
|
'svelte/no-object-in-text-mustaches': 'warn',
|
|
33
|
+
'svelte/no-raw-special-elements': 'warn',
|
|
35
34
|
'svelte/no-reactive-reassign': 'warn',
|
|
36
35
|
'svelte/no-shorthand-style-property-overrides': 'warn',
|
|
37
36
|
'svelte/no-store-async': 'warn',
|
|
37
|
+
'svelte/no-top-level-browser-globals': 'warn',
|
|
38
38
|
'svelte/no-unknown-style-directive-property': 'warn',
|
|
39
|
+
'svelte/prefer-svelte-reactivity': 'warn',
|
|
39
40
|
'svelte/require-store-callbacks-use-set-param': 'warn',
|
|
40
41
|
'svelte/require-store-reactive-access': 'warn',
|
|
41
42
|
'svelte/valid-compile': [
|
|
@@ -44,11 +45,11 @@ export default (svelteConfig) => {
|
|
|
44
45
|
ignoreWarnings: false
|
|
45
46
|
}
|
|
46
47
|
],
|
|
47
|
-
'svelte/valid-
|
|
48
|
+
'svelte/valid-style-parse': 'warn',
|
|
48
49
|
|
|
49
50
|
// Security vulnerabilities
|
|
50
51
|
'svelte/no-at-html-tags': 'off',
|
|
51
|
-
'svelte/no-target-blank': 'off',
|
|
52
|
+
'svelte/no-target-blank': 'off', // Reconsider later
|
|
52
53
|
|
|
53
54
|
// Best practices
|
|
54
55
|
'svelte/block-lang': [
|
|
@@ -68,6 +69,7 @@ export default (svelteConfig) => {
|
|
|
68
69
|
reset: true
|
|
69
70
|
}
|
|
70
71
|
],
|
|
72
|
+
'svelte/no-add-event-listener': 'warn',
|
|
71
73
|
'svelte/no-at-debug-tags': 'off',
|
|
72
74
|
'svelte/no-ignored-unsubscribe': 'warn',
|
|
73
75
|
'svelte/no-immutable-reactive-statements': 'warn',
|
|
@@ -77,11 +79,23 @@ export default (svelteConfig) => {
|
|
|
77
79
|
allowTransitions: false
|
|
78
80
|
}
|
|
79
81
|
],
|
|
80
|
-
'svelte/no-inspect': '
|
|
82
|
+
'svelte/no-inspect': 'off',
|
|
81
83
|
'svelte/no-reactive-functions': 'warn',
|
|
82
84
|
'svelte/no-reactive-literals': 'warn',
|
|
85
|
+
'svelte/no-svelte-internal': 'warn',
|
|
86
|
+
'svelte/no-unnecessary-state-wrap': ['warn', {
|
|
87
|
+
additionalReactiveClasses: [],
|
|
88
|
+
allowReassign: true
|
|
89
|
+
}],
|
|
83
90
|
'svelte/no-unused-class-name': 'off',
|
|
91
|
+
'svelte/no-unused-props': ['error', {
|
|
92
|
+
checkImportedTypes: true,
|
|
93
|
+
ignoreTypePatterns: [],
|
|
94
|
+
ignorePropertyPatterns: [],
|
|
95
|
+
allowUnusedNestedProperties: false
|
|
96
|
+
}],
|
|
84
97
|
'svelte/no-unused-svelte-ignore': 'warn',
|
|
98
|
+
'svelte/no-useless-children-snippet': 'warn',
|
|
85
99
|
'svelte/no-useless-mustaches': [
|
|
86
100
|
'warn',
|
|
87
101
|
{
|
|
@@ -89,6 +103,7 @@ export default (svelteConfig) => {
|
|
|
89
103
|
ignoreStringEscape: true
|
|
90
104
|
}
|
|
91
105
|
],
|
|
106
|
+
'svelte/prefer-const': 'warn',
|
|
92
107
|
'svelte/prefer-destructured-store-props': 'off',
|
|
93
108
|
'svelte/require-each-key': 'warn',
|
|
94
109
|
'svelte/require-event-dispatcher-types': 'warn',
|
|
@@ -97,6 +112,7 @@ export default (svelteConfig) => {
|
|
|
97
112
|
'svelte/valid-each-key': 'warn',
|
|
98
113
|
|
|
99
114
|
// Stylistic issues
|
|
115
|
+
'svelte/consistent-selector-style': 'off', // lmao I'm good bro
|
|
100
116
|
'svelte/derived-has-same-inputs-outputs': 'off', // No other way
|
|
101
117
|
'svelte/first-attribute-linebreak': [
|
|
102
118
|
'warn',
|
|
@@ -105,14 +121,6 @@ export default (svelteConfig) => {
|
|
|
105
121
|
singleline: 'beside'
|
|
106
122
|
}
|
|
107
123
|
],
|
|
108
|
-
'svelte/html-closing-bracket-spacing': [
|
|
109
|
-
'warn',
|
|
110
|
-
{
|
|
111
|
-
startTag: 'never',
|
|
112
|
-
endTag: 'never',
|
|
113
|
-
selfClosingTag: 'always'
|
|
114
|
-
}
|
|
115
|
-
],
|
|
116
124
|
'svelte/html-closing-bracket-new-line': [
|
|
117
125
|
'warn',
|
|
118
126
|
{
|
|
@@ -124,6 +132,14 @@ export default (svelteConfig) => {
|
|
|
124
132
|
}
|
|
125
133
|
}
|
|
126
134
|
],
|
|
135
|
+
'svelte/html-closing-bracket-spacing': [
|
|
136
|
+
'warn',
|
|
137
|
+
{
|
|
138
|
+
startTag: 'never',
|
|
139
|
+
endTag: 'never',
|
|
140
|
+
selfClosingTag: 'always'
|
|
141
|
+
}
|
|
142
|
+
],
|
|
127
143
|
'svelte/html-quotes': [
|
|
128
144
|
'warn',
|
|
129
145
|
{
|
|
@@ -182,16 +198,22 @@ export default (svelteConfig) => {
|
|
|
182
198
|
],
|
|
183
199
|
|
|
184
200
|
// Extension rules
|
|
185
|
-
'svelte/no-inner-declarations': 'off', //
|
|
201
|
+
'svelte/no-inner-declarations': 'off', // Unnnecessary, but useful
|
|
186
202
|
'svelte/no-trailing-spaces': 'warn',
|
|
187
203
|
|
|
204
|
+
// SvelteKit
|
|
205
|
+
'svelte/no-export-load-in-svelte-module-in-kit-pages': 'warn',
|
|
206
|
+
'svelte/no-navigation-without-resolve': 'warn', // Disgusting. But fine.
|
|
207
|
+
'svelte/valid-prop-names-in-kit-pages': 'warn',
|
|
208
|
+
|
|
188
209
|
// System
|
|
189
210
|
'svelte/comment-directive': [
|
|
190
211
|
'off',
|
|
191
212
|
{
|
|
192
213
|
reportUnusedDisableDirectives: true
|
|
193
214
|
}
|
|
194
|
-
]
|
|
215
|
+
],
|
|
216
|
+
'svelte/system': 'warn' // Wtf does this even DO
|
|
195
217
|
}
|
|
196
218
|
}
|
|
197
219
|
);
|