@st1ggy/linter-config 2.31.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
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": {
|
|
@@ -22,10 +22,8 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@eslint/compat": "^1.3.0",
|
|
24
24
|
"@eslint/js": "^9.29.0",
|
|
25
|
-
"@stylistic/eslint-plugin
|
|
26
|
-
"@stylistic/eslint-plugin-jsx": "^4.4.1",
|
|
25
|
+
"@stylistic/eslint-plugin": "^4.4.1",
|
|
27
26
|
"@stylistic/eslint-plugin-migrate": "^4.4.1",
|
|
28
|
-
"@stylistic/eslint-plugin-ts": "^4.4.1",
|
|
29
27
|
"eslint": "^9.29.0",
|
|
30
28
|
"eslint-config-next": "^15.3.3",
|
|
31
29
|
"eslint-config-prettier": "^10.1.5",
|
|
@@ -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
|
])
|