@siberiacancode/eslint 2.0.0 → 2.0.1
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/README.md +3 -3
- package/index.js +98 -98
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# 🔮 eslint configs
|
|
2
|
-
|
|
3
|
-
Пакет содержит eslint конфиг
|
|
1
|
+
# 🔮 eslint configs
|
|
2
|
+
|
|
3
|
+
Пакет содержит eslint конфиг
|
package/index.js
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
import antfu from '@antfu/eslint-config';
|
|
2
|
-
import pluginReact from 'eslint-plugin-react';
|
|
3
|
-
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
4
|
-
import pluginJsxA11y from 'eslint-plugin-jsx-a11y';
|
|
5
|
-
|
|
6
|
-
/** @type {import('@siberiacancode/eslint').Eslint} */
|
|
7
|
-
export const eslint = (...args) =>
|
|
8
|
-
antfu(
|
|
9
|
-
{
|
|
10
|
-
react: true,
|
|
11
|
-
typescript: true,
|
|
12
|
-
jsx: true
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: 'siberiacancode/rewrite',
|
|
16
|
-
rules: {
|
|
17
|
-
'style/semi': 'off',
|
|
18
|
-
'style/jsx-one-expression-per-line': 'off',
|
|
19
|
-
'style/member-delimiter-style': 'off',
|
|
20
|
-
'style/jsx-quotes': ['error', 'prefer-single'],
|
|
21
|
-
'style/comma-dangle': 'off',
|
|
22
|
-
'style/arrow-parens': 'off',
|
|
23
|
-
'style/quote-props': 'off',
|
|
24
|
-
|
|
25
|
-
'antfu/top-level-function': 'off',
|
|
26
|
-
'antfu/if-newline': 'off',
|
|
27
|
-
'antfu/curly': 'off',
|
|
28
|
-
|
|
29
|
-
'react-hooks/exhaustive-deps': 'off',
|
|
30
|
-
|
|
31
|
-
'test/prefer-lowercase-title': 'off',
|
|
32
|
-
|
|
33
|
-
'no-console': 'warn'
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: 'siberiacancode/react',
|
|
38
|
-
plugins: {
|
|
39
|
-
'plugin-react': pluginReact
|
|
40
|
-
},
|
|
41
|
-
settings: {
|
|
42
|
-
react: {
|
|
43
|
-
version: 'detect'
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
rules: {
|
|
47
|
-
'plugin-react/function-component-definition': [
|
|
48
|
-
'error',
|
|
49
|
-
{
|
|
50
|
-
namedComponents: ['arrow-function'],
|
|
51
|
-
unnamedComponents: 'arrow-function'
|
|
52
|
-
}
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: 'siberiacancode/imports',
|
|
58
|
-
plugins: {
|
|
59
|
-
'simple-import-sort': simpleImportSort
|
|
60
|
-
},
|
|
61
|
-
rules: {
|
|
62
|
-
'sort-imports': 'off',
|
|
63
|
-
'import/order': 'off',
|
|
64
|
-
'import/extensions': 'off',
|
|
65
|
-
'simple-import-sort/exports': 'error',
|
|
66
|
-
'simple-import-sort/imports': [
|
|
67
|
-
'error',
|
|
68
|
-
{
|
|
69
|
-
groups: [
|
|
70
|
-
['^react', '^@?\\w'],
|
|
71
|
-
['^@(siberiacancode-core/.*|$)'],
|
|
72
|
-
['^@(([\\/.]?\\w)|assets|test-utils)'],
|
|
73
|
-
['^\\u0000'],
|
|
74
|
-
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
|
|
75
|
-
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
|
|
76
|
-
['^.+\\.s?css$']
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
...args.reduce((acc, config) => {
|
|
83
|
-
if (config['jsx-a11y']) {
|
|
84
|
-
acc.push({
|
|
85
|
-
...pluginJsxA11y.flatConfigs.recommended,
|
|
86
|
-
name: 'siberiacancode/jsx-a11y'
|
|
87
|
-
});
|
|
88
|
-
return acc;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
acc.push({
|
|
92
|
-
...config,
|
|
93
|
-
name: `siberiacancode/${config.name}`
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
return acc;
|
|
97
|
-
}, [])
|
|
98
|
-
);
|
|
1
|
+
import antfu from '@antfu/eslint-config';
|
|
2
|
+
import pluginReact from 'eslint-plugin-react';
|
|
3
|
+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
4
|
+
import pluginJsxA11y from 'eslint-plugin-jsx-a11y';
|
|
5
|
+
|
|
6
|
+
/** @type {import('@siberiacancode/eslint').Eslint} */
|
|
7
|
+
export const eslint = (...args) =>
|
|
8
|
+
antfu(
|
|
9
|
+
{
|
|
10
|
+
react: true,
|
|
11
|
+
typescript: true,
|
|
12
|
+
jsx: true
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
name: 'siberiacancode/rewrite',
|
|
16
|
+
rules: {
|
|
17
|
+
'style/semi': 'off',
|
|
18
|
+
'style/jsx-one-expression-per-line': 'off',
|
|
19
|
+
'style/member-delimiter-style': 'off',
|
|
20
|
+
'style/jsx-quotes': ['error', 'prefer-single'],
|
|
21
|
+
'style/comma-dangle': 'off',
|
|
22
|
+
'style/arrow-parens': 'off',
|
|
23
|
+
'style/quote-props': 'off',
|
|
24
|
+
|
|
25
|
+
'antfu/top-level-function': 'off',
|
|
26
|
+
'antfu/if-newline': 'off',
|
|
27
|
+
'antfu/curly': 'off',
|
|
28
|
+
|
|
29
|
+
'react-hooks/exhaustive-deps': 'off',
|
|
30
|
+
|
|
31
|
+
'test/prefer-lowercase-title': 'off',
|
|
32
|
+
|
|
33
|
+
'no-console': 'warn'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: 'siberiacancode/react',
|
|
38
|
+
plugins: {
|
|
39
|
+
'plugin-react': pluginReact
|
|
40
|
+
},
|
|
41
|
+
settings: {
|
|
42
|
+
react: {
|
|
43
|
+
version: 'detect'
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
rules: {
|
|
47
|
+
'plugin-react/function-component-definition': [
|
|
48
|
+
'error',
|
|
49
|
+
{
|
|
50
|
+
namedComponents: ['arrow-function'],
|
|
51
|
+
unnamedComponents: 'arrow-function'
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: 'siberiacancode/imports',
|
|
58
|
+
plugins: {
|
|
59
|
+
'simple-import-sort': simpleImportSort
|
|
60
|
+
},
|
|
61
|
+
rules: {
|
|
62
|
+
'sort-imports': 'off',
|
|
63
|
+
'import/order': 'off',
|
|
64
|
+
'import/extensions': 'off',
|
|
65
|
+
'simple-import-sort/exports': 'error',
|
|
66
|
+
'simple-import-sort/imports': [
|
|
67
|
+
'error',
|
|
68
|
+
{
|
|
69
|
+
groups: [
|
|
70
|
+
['^react', '^@?\\w'],
|
|
71
|
+
['^@(siberiacancode-core/.*|$)'],
|
|
72
|
+
['^@(([\\/.]?\\w)|assets|test-utils)'],
|
|
73
|
+
['^\\u0000'],
|
|
74
|
+
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
|
|
75
|
+
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
|
|
76
|
+
['^.+\\.s?css$']
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
...args.reduce((acc, config) => {
|
|
83
|
+
if (config['jsx-a11y']) {
|
|
84
|
+
acc.push({
|
|
85
|
+
...pluginJsxA11y.flatConfigs.recommended,
|
|
86
|
+
name: 'siberiacancode/jsx-a11y'
|
|
87
|
+
});
|
|
88
|
+
return acc;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
acc.push({
|
|
92
|
+
...config,
|
|
93
|
+
name: `siberiacancode/${config.name}`
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
return acc;
|
|
97
|
+
}, [])
|
|
98
|
+
);
|