@st1ggy/linter-config 2.0.0 → 2.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/package.json +9 -1
- package/src/eslint/configs/config.common.js +1 -0
- package/src/eslint/configs/config.svelte.js +20 -0
- package/src/eslint/configs/config.typescript.js +1 -0
- package/src/eslint/configs/config.unicorn.js +1 -0
- package/src/eslint/eslint.config.svelte.js +4 -0
- package/src/prettier/prettier.config.svelte.js +13 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@st1ggy/linter-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "ESLint, Stylelint and Prettier configs for React, Vue [WIP] and Svelte [WIP]",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
@@ -34,8 +34,10 @@
|
|
|
34
34
|
"eslint-plugin-react": "^7.37.4",
|
|
35
35
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
36
36
|
"eslint-plugin-sonarjs": "^3.0.2",
|
|
37
|
+
"eslint-plugin-svelte": "^3.1.0",
|
|
37
38
|
"eslint-plugin-unicorn": "^57.0.0",
|
|
38
39
|
"prettier": "^3.5.3",
|
|
40
|
+
"prettier-plugin-svelte": "^3.3.3",
|
|
39
41
|
"stylelint": "^16.15.0",
|
|
40
42
|
"stylelint-config-recommended": "^15.0.0",
|
|
41
43
|
"stylelint-config-sass-guidelines": "^12.1.0",
|
|
@@ -48,9 +50,11 @@
|
|
|
48
50
|
".": "./src/index.js",
|
|
49
51
|
"./eslint-next": "./src/eslint/eslint.config.next.js",
|
|
50
52
|
"./eslint-react": "./src/eslint/eslint.config.react.js",
|
|
53
|
+
"./eslint-svelte": "./src/eslint/eslint.config.svelte.js",
|
|
51
54
|
"./eslint-typescript": "./src/eslint/eslint.config.typescript.js",
|
|
52
55
|
"./eslint-common": "./src/eslint/eslint.config.common.js",
|
|
53
56
|
"./prettier-common": "./src/prettier/prettier.config.common.js",
|
|
57
|
+
"./prettier-svelte": "./src/prettier/prettier.config.svelte.js",
|
|
54
58
|
"./stylelint-common": "./src/stylelint/stylelint.config.common.js",
|
|
55
59
|
"./stylelint-scss": "./src/stylelint/stylelint.config.scss.js"
|
|
56
60
|
},
|
|
@@ -60,5 +64,9 @@
|
|
|
60
64
|
"scripts": {
|
|
61
65
|
"lint": "eslint .",
|
|
62
66
|
"lint:fix": "eslint . --fix"
|
|
67
|
+
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"react": "^18.0.0",
|
|
70
|
+
"svelte": "^5.23.0"
|
|
63
71
|
}
|
|
64
72
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import sveltePlugin from 'eslint-plugin-svelte'
|
|
2
|
+
import { config, parser } from 'typescript-eslint'
|
|
3
|
+
|
|
4
|
+
import { files } from './constants.js'
|
|
5
|
+
|
|
6
|
+
export default config([
|
|
7
|
+
sveltePlugin.configs['flat/recommended'],
|
|
8
|
+
{
|
|
9
|
+
files,
|
|
10
|
+
rules: {},
|
|
11
|
+
languageOptions: {
|
|
12
|
+
parserOptions: {
|
|
13
|
+
project: ['tsconfig.json'],
|
|
14
|
+
projectService: true,
|
|
15
|
+
extraFileExtensions: ['.svelte', '.svelte.js', '.svelte.ts'],
|
|
16
|
+
parser,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
])
|
|
@@ -24,6 +24,7 @@ export default config([
|
|
|
24
24
|
],
|
|
25
25
|
'@typescript-eslint/switch-exhaustiveness-check': 'error',
|
|
26
26
|
'@typescript-eslint/consistent-type-imports': ['error', { fixStyle: 'inline-type-imports' }],
|
|
27
|
+
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
|
|
27
28
|
},
|
|
28
29
|
},
|
|
29
30
|
])
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
plugins: ['prettier-plugin-svelte'],
|
|
3
|
+
overrides: [{ files: '*.svelte', options: { parser: 'svelte' } }],
|
|
4
|
+
useTabs: false,
|
|
5
|
+
printWidth: 120,
|
|
6
|
+
tabWidth: 2,
|
|
7
|
+
semi: false,
|
|
8
|
+
singleQuote: true,
|
|
9
|
+
trailingComma: 'all',
|
|
10
|
+
bracketSpacing: true,
|
|
11
|
+
arrowParens: 'always',
|
|
12
|
+
proseWrap: 'never',
|
|
13
|
+
}
|