@egs33/eslint-config 2.0.3 → 2.1.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/package.json +11 -1
- package/typescript-svelte.js +98 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egs33/eslint-config",
|
|
3
3
|
"description": "eslint config for me",
|
|
4
|
-
"version": "2.0
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"author": "egs33",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"dependencies": {
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"@typescript-eslint/parser": "^6.1.0",
|
|
21
21
|
"eslint": "^8.44.0",
|
|
22
22
|
"eslint-plugin-vue": "^9.5.0",
|
|
23
|
+
"svelte-eslint-parser": "^0.32.2",
|
|
23
24
|
"typescript": "^5.0.2",
|
|
24
25
|
"vue-eslint-parser": "^9.1.0"
|
|
25
26
|
},
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
"typescript-base.js",
|
|
36
37
|
"typescript-node.js",
|
|
37
38
|
"typescript-browser.js",
|
|
39
|
+
"typescript-svelte.js",
|
|
38
40
|
"plugin-rules"
|
|
39
41
|
],
|
|
40
42
|
"homepage": "https://github.com/egs33/eslint-config",
|
|
@@ -46,8 +48,10 @@
|
|
|
46
48
|
"main": "nodejs.js",
|
|
47
49
|
"peerDependencies": {
|
|
48
50
|
"@typescript-eslint/eslint-plugin": "^6.1.0",
|
|
51
|
+
"@typescript-eslint/parser": "^6.1.0",
|
|
49
52
|
"eslint": "^8.44.0",
|
|
50
53
|
"eslint-plugin-vue": "^9.5.0",
|
|
54
|
+
"svelte-eslint-parser": "^0.32.2",
|
|
51
55
|
"typescript": ">=4.4.4",
|
|
52
56
|
"vue-eslint-parser": "^9.1.0"
|
|
53
57
|
},
|
|
@@ -55,9 +59,15 @@
|
|
|
55
59
|
"@typescript-eslint/eslint-plugin": {
|
|
56
60
|
"optional": true
|
|
57
61
|
},
|
|
62
|
+
"@typescript-eslint/parser": {
|
|
63
|
+
"optional": true
|
|
64
|
+
},
|
|
58
65
|
"eslint-plugin-vue": {
|
|
59
66
|
"optional": true
|
|
60
67
|
},
|
|
68
|
+
"svelte-eslint-parser": {
|
|
69
|
+
"optional": true
|
|
70
|
+
},
|
|
61
71
|
"vue-eslint-parser": {
|
|
62
72
|
"optional": true
|
|
63
73
|
},
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import svelteParser from 'svelte-eslint-parser';
|
|
2
|
+
import tsParser from '@typescript-eslint/parser';
|
|
3
|
+
import typescriptBrowser from './typescript-browser.js';
|
|
4
|
+
|
|
5
|
+
export default [
|
|
6
|
+
...typescriptBrowser,
|
|
7
|
+
{
|
|
8
|
+
languageOptions: {
|
|
9
|
+
parser: svelteParser,
|
|
10
|
+
parserOptions: {
|
|
11
|
+
parser: tsParser,
|
|
12
|
+
project: './tsconfig.eslint.json',
|
|
13
|
+
extraFileExtensions: ['.svelte'],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
settings: {
|
|
17
|
+
'import/resolver': {
|
|
18
|
+
typescript: {
|
|
19
|
+
project: './tsconfig.eslint.json',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
rules: {
|
|
24
|
+
'import/no-mutable-exports': 'off',
|
|
25
|
+
'import/no-named-as-default': 'off',
|
|
26
|
+
'svelte/infinite-reactive-loop': 'error',
|
|
27
|
+
'svelte/no-dom-manipulating': 'error',
|
|
28
|
+
'svelte/no-dupe-else-if-blocks': 'error',
|
|
29
|
+
'svelte/no-dupe-on-directives': 'error',
|
|
30
|
+
'svelte/no-dupe-style-properties': 'error',
|
|
31
|
+
'svelte/no-dupe-use-directives': 'error',
|
|
32
|
+
'svelte/no-dynamic-slot-name': 'error',
|
|
33
|
+
'svelte/no-export-load-in-svelte-module-in-kit-pages': 'error',
|
|
34
|
+
'svelte/no-not-function-handler': 'error',
|
|
35
|
+
'svelte/no-object-in-text-mustaches': 'error',
|
|
36
|
+
'svelte/no-reactive-reassign': 'error',
|
|
37
|
+
'svelte/no-shorthand-style-property-overrides': 'error',
|
|
38
|
+
'svelte/no-store-async': 'error',
|
|
39
|
+
'svelte/no-unknown-style-directive-property': 'error',
|
|
40
|
+
'svelte/require-store-callbacks-use-set-param': 'error',
|
|
41
|
+
'svelte/require-store-reactive-access': 'error',
|
|
42
|
+
'svelte/valid-compile': 'error',
|
|
43
|
+
'svelte/valid-prop-names-in-kit-pages': 'error',
|
|
44
|
+
|
|
45
|
+
'svelte/no-at-html-tags': 'error',
|
|
46
|
+
'svelte/no-target-blank': 'off', // use noreferrer only is ok
|
|
47
|
+
|
|
48
|
+
'svelte/block-lang': ['error', {
|
|
49
|
+
script: ['ts', null],
|
|
50
|
+
style: ['scss', null],
|
|
51
|
+
}],
|
|
52
|
+
'svelte/button-has-type': 'error',
|
|
53
|
+
'svelte/no-at-debug-tags': 'warn',
|
|
54
|
+
'svelte/no-immutable-reactive-statements': 'error',
|
|
55
|
+
'svelte/no-reactive-functions': 'error',
|
|
56
|
+
'svelte/no-reactive-literals': 'error',
|
|
57
|
+
'svelte/no-unused-class-name': 'error',
|
|
58
|
+
'svelte/no-unused-svelte-ignore': 'error',
|
|
59
|
+
'svelte/no-useless-mustaches': 'error',
|
|
60
|
+
'svelte/prefer-destructured-store-props': 'warn', // 様子見
|
|
61
|
+
'svelte/require-each-key': 'error',
|
|
62
|
+
'svelte/require-event-dispatcher-types': 'error',
|
|
63
|
+
'svelte/require-optimized-style-attribute': 'error',
|
|
64
|
+
'svelte/require-stores-init': 'error',
|
|
65
|
+
'svelte/valid-each-key': 'error',
|
|
66
|
+
|
|
67
|
+
'svelte/derived-has-same-inputs-outputs': 'off',
|
|
68
|
+
'svelte/first-attribute-linebreak': 'error',
|
|
69
|
+
'svelte/html-closing-bracket-spacing': 'error',
|
|
70
|
+
'svelte/html-quotes': 'error',
|
|
71
|
+
'svelte/indent': 'error',
|
|
72
|
+
indent: 'off',
|
|
73
|
+
'@typescript-eslint/indent': 'off',
|
|
74
|
+
'svelte/max-attributes-per-line': ['error', { singleline: 4 }],
|
|
75
|
+
'svelte/mustache-spacing': 'error',
|
|
76
|
+
'svelte/no-extra-reactive-curlies': 'error',
|
|
77
|
+
'svelte/no-restricted-html-elements': 'off',
|
|
78
|
+
'svelte/no-spaces-around-equal-signs-in-attribute': 'error',
|
|
79
|
+
'svelte/prefer-class-directive': 'error',
|
|
80
|
+
'svelte/prefer-style-directive': 'error',
|
|
81
|
+
'svelte/shorthand-attribute': 'error',
|
|
82
|
+
'svelte/shorthand-directive': 'error',
|
|
83
|
+
'svelte/sort-attributes': 'off',
|
|
84
|
+
'svelte/spaced-html-comment': 'error',
|
|
85
|
+
|
|
86
|
+
'svelte/no-inner-declarations': 'error',
|
|
87
|
+
'svelte/no-trailing-spaces': 'error',
|
|
88
|
+
|
|
89
|
+
'svelte/comment-directive': [
|
|
90
|
+
'error',
|
|
91
|
+
{
|
|
92
|
+
reportUnusedDisableDirectives: true,
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
'svelte/system': 'error',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
];
|