@st1ggy/linter-config 2.30.0 → 2.32.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 +15 -17
- package/scripts/init-common.sh +12 -0
- package/src/eslint/configs/config.common.js +18 -18
- package/src/eslint/configs/config.react.js +12 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@st1ggy/linter-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.32.0",
|
|
4
4
|
"description": "ESLint, Stylelint and Prettier configs for React, Vue [WIP] and Svelte [WIP]",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
@@ -20,38 +20,36 @@
|
|
|
20
20
|
},
|
|
21
21
|
"homepage": "https://github.com/St1ggy/linter-config#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@eslint/compat": "^1.
|
|
24
|
-
"@eslint/js": "^9.
|
|
25
|
-
"@stylistic/eslint-plugin
|
|
26
|
-
"@stylistic/eslint-plugin-
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"eslint": "^
|
|
30
|
-
"eslint-config-next": "^15.3.2",
|
|
31
|
-
"eslint-config-prettier": "^10.1.3",
|
|
23
|
+
"@eslint/compat": "^1.3.0",
|
|
24
|
+
"@eslint/js": "^9.29.0",
|
|
25
|
+
"@stylistic/eslint-plugin": "^4.4.1",
|
|
26
|
+
"@stylistic/eslint-plugin-migrate": "^4.4.1",
|
|
27
|
+
"eslint": "^9.29.0",
|
|
28
|
+
"eslint-config-next": "^15.3.3",
|
|
29
|
+
"eslint-config-prettier": "^10.1.5",
|
|
32
30
|
"eslint-import-resolver-custom-alias": "^1.3.2",
|
|
33
|
-
"eslint-import-resolver-typescript": "^4.3
|
|
31
|
+
"eslint-import-resolver-typescript": "^4.4.3",
|
|
34
32
|
"eslint-plugin-import": "^2.31.0",
|
|
35
|
-
"eslint-plugin-prettier": "^5.4.
|
|
33
|
+
"eslint-plugin-prettier": "^5.4.1",
|
|
36
34
|
"eslint-plugin-react": "^7.37.5",
|
|
37
35
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
38
36
|
"eslint-plugin-sonarjs": "^3.0.2",
|
|
39
|
-
"eslint-plugin-svelte": "^3.
|
|
37
|
+
"eslint-plugin-svelte": "^3.9.2",
|
|
40
38
|
"eslint-plugin-unicorn": "^59.0.1",
|
|
41
39
|
"find-up-simple": "^1.0.1",
|
|
42
40
|
"patch-package": "^8.0.0",
|
|
43
41
|
"prettier": "^3.5.3",
|
|
44
|
-
"prettier-plugin-svelte": "^3.
|
|
45
|
-
"stylelint": "^16.
|
|
42
|
+
"prettier-plugin-svelte": "^3.4.0",
|
|
43
|
+
"stylelint": "^16.20.0",
|
|
46
44
|
"stylelint-config-clean-order": "^7.0.0",
|
|
47
45
|
"stylelint-config-recommended": "^16.0.0",
|
|
48
|
-
"stylelint-config-recommended-scss": "^
|
|
46
|
+
"stylelint-config-recommended-scss": "^15.0.1",
|
|
49
47
|
"stylelint-config-sass-guidelines": "^12.1.0",
|
|
50
48
|
"stylelint-config-tailwindcss": "^1.0.0",
|
|
51
49
|
"stylelint-order": "^7.0.0",
|
|
52
50
|
"stylelint-prettier": "^5.0.3",
|
|
53
51
|
"typescript": "^5.8.3",
|
|
54
|
-
"typescript-eslint": "^8.
|
|
52
|
+
"typescript-eslint": "^8.34.0"
|
|
55
53
|
},
|
|
56
54
|
"type": "module",
|
|
57
55
|
"types": "index.d.ts",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
declare -A postfix_map=(
|
|
4
|
+
[eslint]="common"
|
|
5
|
+
[stylelint]="scss"
|
|
6
|
+
[prettier]="common"
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
for l in eslint stylelint prettier; do
|
|
10
|
+
echo "creating $l.config.js with ${l}-${postfix_map[$l]}"
|
|
11
|
+
echo "export { default } from '@st1ggy/linter-config/${l}-${postfix_map[$l]}';" > $l.config.js;
|
|
12
|
+
done
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import eslint from '@eslint/js'
|
|
2
|
-
import
|
|
2
|
+
import stylistic from '@stylistic/eslint-plugin'
|
|
3
3
|
import { defineConfig } from 'eslint/config'
|
|
4
4
|
|
|
5
5
|
import { files } from './constants.js'
|
|
6
6
|
|
|
7
7
|
export default defineConfig([
|
|
8
8
|
eslint.configs.recommended,
|
|
9
|
-
|
|
9
|
+
stylistic.configs.all,
|
|
10
10
|
{
|
|
11
11
|
files,
|
|
12
|
-
plugins: { '@stylistic
|
|
12
|
+
plugins: { '@stylistic': stylistic },
|
|
13
13
|
rules: {
|
|
14
14
|
'no-console': 'warn',
|
|
15
15
|
'no-debugger': 'warn',
|
|
@@ -63,22 +63,22 @@ export default defineConfig([
|
|
|
63
63
|
],
|
|
64
64
|
curly: ['error', 'all'],
|
|
65
65
|
// @stylistic
|
|
66
|
-
'@stylistic/
|
|
67
|
-
'@stylistic/
|
|
68
|
-
'@stylistic/
|
|
69
|
-
'@stylistic/
|
|
70
|
-
'@stylistic/
|
|
71
|
-
'@stylistic/
|
|
72
|
-
'@stylistic/
|
|
73
|
-
'@stylistic/
|
|
66
|
+
'@stylistic/object-curly-newline': 'off',
|
|
67
|
+
'@stylistic/operator-linebreak': 'off',
|
|
68
|
+
'@stylistic/function-paren-newline': 'off',
|
|
69
|
+
'@stylistic/no-confusing-arrow': 'off',
|
|
70
|
+
'@stylistic/newline-per-chained-call': 'off',
|
|
71
|
+
'@stylistic/indent': 'off',
|
|
72
|
+
'@stylistic/implicit-arrow-linebreak': 'off',
|
|
73
|
+
'@stylistic/lines-between-class-members': [
|
|
74
74
|
'error',
|
|
75
75
|
'always',
|
|
76
76
|
{
|
|
77
77
|
exceptAfterSingleLine: true,
|
|
78
78
|
},
|
|
79
79
|
],
|
|
80
|
-
'@stylistic/
|
|
81
|
-
'@stylistic/
|
|
80
|
+
'@stylistic/no-mixed-operators': 'off',
|
|
81
|
+
'@stylistic/max-len': [
|
|
82
82
|
'error',
|
|
83
83
|
{
|
|
84
84
|
code: 120,
|
|
@@ -89,10 +89,10 @@ export default defineConfig([
|
|
|
89
89
|
ignoreTrailingComments: true,
|
|
90
90
|
},
|
|
91
91
|
],
|
|
92
|
-
'@stylistic/
|
|
93
|
-
'@stylistic/
|
|
94
|
-
'@stylistic/
|
|
95
|
-
'@stylistic/
|
|
92
|
+
'@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
|
|
93
|
+
'@stylistic/spaced-comment': ['error', 'always'],
|
|
94
|
+
'@stylistic/object-curly-spacing': ['error', 'always', { objectsInObjects: true }],
|
|
95
|
+
'@stylistic/padding-line-between-statements': [
|
|
96
96
|
'error',
|
|
97
97
|
{ blankLine: 'always', prev: '*', next: 'if' },
|
|
98
98
|
{ blankLine: 'always', prev: 'if', next: 'if' },
|
|
@@ -102,7 +102,7 @@ export default defineConfig([
|
|
|
102
102
|
{ blankLine: 'always', prev: '*', next: 'case' },
|
|
103
103
|
{ blankLine: 'always', prev: 'if', next: '*' },
|
|
104
104
|
],
|
|
105
|
-
'@stylistic/
|
|
105
|
+
'@stylistic/multiline-comment-style': ['error', 'separate-lines', { checkJSDoc: true }],
|
|
106
106
|
},
|
|
107
107
|
},
|
|
108
108
|
])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import stylistic from '@stylistic/eslint-plugin'
|
|
2
2
|
import { defineConfig } from 'eslint/config'
|
|
3
3
|
import reactPlugin from 'eslint-plugin-react'
|
|
4
4
|
import reactHooksPlugin from 'eslint-plugin-react-hooks'
|
|
@@ -8,7 +8,7 @@ import { files } from './constants.js'
|
|
|
8
8
|
export default defineConfig([
|
|
9
9
|
reactPlugin.configs.flat.recommended,
|
|
10
10
|
reactPlugin.configs.flat['jsx-runtime'],
|
|
11
|
-
|
|
11
|
+
stylistic.configs.recommended,
|
|
12
12
|
{
|
|
13
13
|
files,
|
|
14
14
|
plugins: { 'react-hooks': reactHooksPlugin },
|
|
@@ -37,11 +37,11 @@ export default defineConfig([
|
|
|
37
37
|
|
|
38
38
|
...reactHooksPlugin.configs.recommended.rules,
|
|
39
39
|
// @stylistic
|
|
40
|
-
'@stylistic/jsx
|
|
41
|
-
'@stylistic/jsx
|
|
42
|
-
'@stylistic/jsx
|
|
43
|
-
'@stylistic/jsx
|
|
44
|
-
'@stylistic/jsx
|
|
40
|
+
'@stylistic/jsx-closing-bracket-location': 'error',
|
|
41
|
+
'@stylistic/jsx-closing-tag-location': 'error',
|
|
42
|
+
'@stylistic/jsx-curly-brace-presence': ['error', { props: 'never', children: 'never' }],
|
|
43
|
+
'@stylistic/jsx-curly-newline': ['error', { multiline: 'consistent', singleline: 'forbid' }],
|
|
44
|
+
'@stylistic/jsx-curly-spacing': [
|
|
45
45
|
'error',
|
|
46
46
|
{
|
|
47
47
|
when: 'never',
|
|
@@ -49,11 +49,11 @@ export default defineConfig([
|
|
|
49
49
|
children: false,
|
|
50
50
|
},
|
|
51
51
|
],
|
|
52
|
-
'@stylistic/jsx
|
|
53
|
-
'@stylistic/jsx
|
|
54
|
-
'@stylistic/jsx
|
|
55
|
-
'@stylistic/jsx
|
|
56
|
-
'@stylistic/jsx
|
|
52
|
+
'@stylistic/jsx-equals-spacing': ['error', 'never'],
|
|
53
|
+
'@stylistic/jsx-first-prop-new-line': ['error', 'multiline'],
|
|
54
|
+
'@stylistic/jsx-max-props-per-line': ['error', { when: 'multiline' }],
|
|
55
|
+
'@stylistic/jsx-props-no-multi-spaces': 'error',
|
|
56
|
+
'@stylistic/jsx-tag-spacing': 'error',
|
|
57
57
|
},
|
|
58
58
|
},
|
|
59
59
|
])
|