@st1ggy/linter-config 1.0.21 → 1.0.22
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.
|
@@ -3,104 +3,105 @@ import prettierConfig from 'eslint-config-prettier'
|
|
|
3
3
|
import importPlugin from 'eslint-plugin-import'
|
|
4
4
|
import prettierPlugin from 'eslint-plugin-prettier'
|
|
5
5
|
|
|
6
|
-
export default
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
6
|
+
export default [
|
|
7
|
+
eslint.configs.recommended,
|
|
8
|
+
prettierConfig,
|
|
9
|
+
{
|
|
10
|
+
plugins: {
|
|
11
|
+
import: importPlugin,
|
|
12
|
+
prettier: prettierPlugin,
|
|
13
|
+
},
|
|
14
|
+
rules: {
|
|
15
|
+
'no-console': 'warn',
|
|
16
|
+
'no-debugger': 'warn',
|
|
17
|
+
'prettier/prettier': 'error',
|
|
18
|
+
'object-curly-newline': 'off',
|
|
19
|
+
'operator-linebreak': 'off',
|
|
20
|
+
'function-paren-newline': 'off',
|
|
21
|
+
'no-confusing-arrow': 'off',
|
|
22
|
+
'newline-per-chained-call': 'off',
|
|
23
|
+
indent: 'off',
|
|
24
|
+
'implicit-arrow-linebreak': 'off',
|
|
25
|
+
'no-undef': 'off',
|
|
26
|
+
'lines-between-class-members': [
|
|
27
|
+
'error',
|
|
28
|
+
'always',
|
|
29
|
+
{
|
|
30
|
+
exceptAfterSingleLine: true,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
'prefer-template': 'error',
|
|
34
|
+
'arrow-body-style': ['error', 'as-needed'],
|
|
35
|
+
'no-return-assign': 'off',
|
|
36
|
+
'newline-before-return': ['error'],
|
|
37
|
+
radix: 'off',
|
|
38
|
+
'no-mixed-operators': 'off',
|
|
39
|
+
'max-len': [
|
|
40
|
+
'error',
|
|
41
|
+
{
|
|
42
|
+
code: 120,
|
|
43
|
+
tabWidth: 2,
|
|
44
|
+
ignoreComments: true,
|
|
45
|
+
ignoreRegExpLiterals: true,
|
|
46
|
+
ignoreStrings: true,
|
|
47
|
+
ignoreTrailingComments: true,
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
camelcase: [
|
|
51
|
+
'error',
|
|
52
|
+
{
|
|
53
|
+
allow: ['Open_Sans'],
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
'no-shadow': 'off',
|
|
57
|
+
'no-unused-vars': 'off',
|
|
58
|
+
'no-use-before-define': 'off',
|
|
59
|
+
'import/newline-after-import': 'error',
|
|
60
|
+
'sort-imports': [
|
|
61
|
+
'error',
|
|
62
|
+
{
|
|
63
|
+
ignoreDeclarationSort: true,
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
'import/order': [
|
|
67
|
+
'error',
|
|
68
|
+
{
|
|
69
|
+
'newlines-between': 'always',
|
|
70
|
+
groups: [['builtin', 'external'], ['internal'], ['sibling', 'parent', 'index', 'object'], ['type']],
|
|
71
|
+
pathGroups: [
|
|
72
|
+
{
|
|
73
|
+
pattern: '@/**',
|
|
74
|
+
group: 'external',
|
|
75
|
+
position: 'after',
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
alphabetize: {
|
|
79
|
+
order: 'asc',
|
|
80
|
+
caseInsensitive: false,
|
|
76
81
|
},
|
|
77
|
-
],
|
|
78
|
-
alphabetize: {
|
|
79
|
-
order: 'asc',
|
|
80
|
-
caseInsensitive: false,
|
|
81
82
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
83
|
+
],
|
|
84
|
+
quotes: ['error', 'single'],
|
|
85
|
+
'import/no-duplicates': [
|
|
86
|
+
'error',
|
|
87
|
+
{
|
|
88
|
+
considerQueryString: true,
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
'object-shorthand': 'error',
|
|
92
|
+
'prefer-const': 'error',
|
|
93
|
+
'class-methods-use-this': 'off',
|
|
94
|
+
'import/prefer-default-export': 'off',
|
|
95
|
+
'import/extensions': [
|
|
96
|
+
'error',
|
|
97
|
+
'never',
|
|
98
|
+
{
|
|
99
|
+
js: 'never',
|
|
100
|
+
json: 'ignorePackages',
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
'import/no-unresolved': ['error', {}],
|
|
104
|
+
'spaced-comment': ['error', 'always'],
|
|
105
|
+
},
|
|
105
106
|
},
|
|
106
|
-
|
|
107
|
+
]
|
|
@@ -3,55 +3,55 @@ import reactHooksPlugin from 'eslint-plugin-react-hooks'
|
|
|
3
3
|
|
|
4
4
|
import typescript from './eslint.config.typescript.js'
|
|
5
5
|
|
|
6
|
-
export default
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export default [
|
|
7
|
+
typescript,
|
|
8
|
+
{
|
|
9
|
+
plugins: {
|
|
10
|
+
react: reactPlugin,
|
|
11
|
+
'react-hooks': reactHooksPlugin,
|
|
12
|
+
},
|
|
13
|
+
rules: {
|
|
14
|
+
'react/sort-comp': 'off',
|
|
15
|
+
'react/prop-types': 'off',
|
|
16
|
+
'react/jsx-curly-newline': 'off',
|
|
17
|
+
'react/state-in-constructor': 'off',
|
|
18
|
+
'react/require-default-props': 'off',
|
|
19
|
+
'react/jsx-props-no-spreading': 'off',
|
|
20
|
+
'react/jsx-filename-extension': 'off',
|
|
21
|
+
'react/destructuring-assignment': 'off',
|
|
22
|
+
'react/static-property-placement': 'off',
|
|
23
|
+
'react/jsx-one-expression-per-line': 'off',
|
|
24
|
+
'react/self-closing-comp': [
|
|
25
|
+
'error',
|
|
26
|
+
{
|
|
27
|
+
component: true,
|
|
28
|
+
html: true,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
'react/default-props-match-prop-types': [
|
|
32
|
+
'warn',
|
|
33
|
+
{
|
|
34
|
+
allowRequiredDefaults: true,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
'react/jsx-wrap-multilines': 'off',
|
|
38
|
+
'react/jsx-indent': 'off',
|
|
39
|
+
'react-hooks/rules-of-hooks': 'error',
|
|
40
|
+
'react-hooks/exhaustive-deps': 'error',
|
|
41
|
+
'react/function-component-definition': [
|
|
42
|
+
'error',
|
|
43
|
+
{
|
|
44
|
+
namedComponents: 'arrow-function',
|
|
45
|
+
unnamedComponents: 'arrow-function',
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
'react/jsx-curly-brace-presence': [
|
|
49
|
+
'warn',
|
|
50
|
+
{
|
|
51
|
+
props: 'never',
|
|
52
|
+
children: 'never',
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
12
56
|
},
|
|
13
|
-
|
|
14
|
-
...typescript.rules,
|
|
15
|
-
'react/sort-comp': 'off',
|
|
16
|
-
'react/prop-types': 'off',
|
|
17
|
-
'react/jsx-curly-newline': 'off',
|
|
18
|
-
'react/state-in-constructor': 'off',
|
|
19
|
-
'react/require-default-props': 'off',
|
|
20
|
-
'react/jsx-props-no-spreading': 'off',
|
|
21
|
-
'react/jsx-filename-extension': 'off',
|
|
22
|
-
'react/destructuring-assignment': 'off',
|
|
23
|
-
'react/static-property-placement': 'off',
|
|
24
|
-
'react/jsx-one-expression-per-line': 'off',
|
|
25
|
-
'react/self-closing-comp': [
|
|
26
|
-
'error',
|
|
27
|
-
{
|
|
28
|
-
component: true,
|
|
29
|
-
html: true,
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
'react/default-props-match-prop-types': [
|
|
33
|
-
'warn',
|
|
34
|
-
{
|
|
35
|
-
allowRequiredDefaults: true,
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
'react/jsx-wrap-multilines': 'off',
|
|
39
|
-
'react/jsx-indent': 'off',
|
|
40
|
-
'react-hooks/rules-of-hooks': 'error',
|
|
41
|
-
'react-hooks/exhaustive-deps': 'error',
|
|
42
|
-
'react/function-component-definition': [
|
|
43
|
-
'error',
|
|
44
|
-
{
|
|
45
|
-
namedComponents: 'arrow-function',
|
|
46
|
-
unnamedComponents: 'arrow-function',
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
'react/jsx-curly-brace-presence': [
|
|
50
|
-
'warn',
|
|
51
|
-
{
|
|
52
|
-
props: 'never',
|
|
53
|
-
children: 'never',
|
|
54
|
-
},
|
|
55
|
-
],
|
|
56
|
-
},
|
|
57
|
-
}
|
|
57
|
+
]
|
|
@@ -2,38 +2,41 @@ import tseslint from 'typescript-eslint'
|
|
|
2
2
|
|
|
3
3
|
import common from './eslint.config.common.js'
|
|
4
4
|
|
|
5
|
-
export default tseslint.config(...tseslint.configs.strict, ...tseslint.configs.stylistic,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
'
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
'error',
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
'
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
'error',
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
5
|
+
export default tseslint.config(...tseslint.configs.strict, ...tseslint.configs.stylistic, [
|
|
6
|
+
common,
|
|
7
|
+
{
|
|
8
|
+
rules: {
|
|
9
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
10
|
+
'@typescript-eslint/ban-types': ['warn'],
|
|
11
|
+
'@typescript-eslint/no-shadow': [
|
|
12
|
+
'error',
|
|
13
|
+
{
|
|
14
|
+
ignoreTypeValueShadow: true,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
'@typescript-eslint/no-var-requires': ['off'],
|
|
18
|
+
'@typescript-eslint/no-empty-function': ['off'],
|
|
19
|
+
'@typescript-eslint/no-use-before-define': ['error'],
|
|
20
|
+
'@typescript-eslint/no-unused-vars': [
|
|
21
|
+
'error',
|
|
22
|
+
{
|
|
23
|
+
ignoreRestSiblings: true,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
'@typescript-eslint/ban-ts-comment': [
|
|
27
|
+
'error',
|
|
28
|
+
{
|
|
29
|
+
'ts-expect-error': 'allow-with-description',
|
|
30
|
+
'ts-ignore': 'allow-with-description',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
'@typescript-eslint/switch-exhaustiveness-check': 'error',
|
|
34
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
35
|
+
'error',
|
|
36
|
+
{
|
|
37
|
+
fixStyle: 'inline-type-imports',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
},
|
|
38
41
|
},
|
|
39
|
-
|
|
42
|
+
])
|