@siberiacancode/eslint 1.0.0 → 1.0.2
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/.eslintrc.node.js +99 -99
- package/.eslintrc.react.js +110 -110
- package/package.json +2 -3
package/.eslintrc.node.js
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
/** @type {import('eslint').Linter.Config} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
env: {
|
|
4
|
-
browser: true,
|
|
5
|
-
es2021: true
|
|
6
|
-
},
|
|
7
|
-
extends: [
|
|
8
|
-
'airbnb-base',
|
|
9
|
-
'plugin:eslint-comments/recommended',
|
|
10
|
-
'plugin:promise/recommended',
|
|
11
|
-
'plugin:prettier/recommended'
|
|
12
|
-
],
|
|
13
|
-
plugins: ['simple-import-sort', 'prettier'],
|
|
14
|
-
ignorePatterns: ['dist', 'coverage'],
|
|
15
|
-
parserOptions: {
|
|
16
|
-
ecmaVersion: 'latest',
|
|
17
|
-
sourceType: 'module'
|
|
18
|
-
},
|
|
19
|
-
rules: {
|
|
20
|
-
'max-len': 'off',
|
|
21
|
-
'consistent-return': 'off',
|
|
22
|
-
'no-shadow': 'off',
|
|
23
|
-
'no-param-reassign': 'warn',
|
|
24
|
-
'no-console': ['warn', { allow: ['info', 'error'] }],
|
|
25
|
-
'sort-imports': 'off',
|
|
26
|
-
'import/order': 'off',
|
|
27
|
-
'import/extensions': 'off',
|
|
28
|
-
'import/prefer-default-export': 'off',
|
|
29
|
-
'import/no-extraneous-dependencies': 'off',
|
|
30
|
-
'simple-import-sort/exports': 'error',
|
|
31
|
-
'simple-import-sort/imports': [
|
|
32
|
-
'error',
|
|
33
|
-
{
|
|
34
|
-
groups: [
|
|
35
|
-
// External packages:
|
|
36
|
-
['^react', '^@?\\w'],
|
|
37
|
-
// Internal packages:
|
|
38
|
-
['^@(
|
|
39
|
-
// Alias imports:
|
|
40
|
-
['^@(([\\/.]?\\w)|assets|test-utils)'],
|
|
41
|
-
// Side effect imports:
|
|
42
|
-
['^\\u0000'],
|
|
43
|
-
// Parent imports:
|
|
44
|
-
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
|
|
45
|
-
// Other relative imports:
|
|
46
|
-
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
|
|
47
|
-
// Style imports:
|
|
48
|
-
['^.+\\.s?css$']
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
'require-await': 'error'
|
|
53
|
-
},
|
|
54
|
-
overrides: [
|
|
55
|
-
{
|
|
56
|
-
files: ['*.ts', '*.tsx'],
|
|
57
|
-
parser: '@typescript-eslint/parser',
|
|
58
|
-
parserOptions: {
|
|
59
|
-
project: './tsconfig.json'
|
|
60
|
-
},
|
|
61
|
-
extends: [
|
|
62
|
-
'airbnb-typescript/base',
|
|
63
|
-
'plugin:@typescript-eslint/recommended',
|
|
64
|
-
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
65
|
-
'plugin:prettier/recommended'
|
|
66
|
-
],
|
|
67
|
-
settings: {
|
|
68
|
-
'import/parsers': {
|
|
69
|
-
'@typescript-eslint/parser': ['.ts', '.tsx']
|
|
70
|
-
},
|
|
71
|
-
'import/resolver': {
|
|
72
|
-
typescript: {
|
|
73
|
-
project: './tsconfig.json'
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
rules: {
|
|
78
|
-
'import/order': 'off',
|
|
79
|
-
'import/extensions': 'off',
|
|
80
|
-
'import/prefer-default-export': 'off',
|
|
81
|
-
'import/no-extraneous-dependencies': 'off',
|
|
82
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
83
|
-
'@typescript-eslint/no-unsafe-return': 'off',
|
|
84
|
-
'@typescript-eslint/ban-ts-comment': 'off',
|
|
85
|
-
'@typescript-eslint/no-shadow': 'off',
|
|
86
|
-
'@typescript-eslint/restrict-template-expressions': [
|
|
87
|
-
'warn',
|
|
88
|
-
{ allowBoolean: true, allowNullish: true }
|
|
89
|
-
],
|
|
90
|
-
'@typescript-eslint/consistent-type-imports': [
|
|
91
|
-
'error',
|
|
92
|
-
{ prefer: 'type-imports', disallowTypeAnnotations: false }
|
|
93
|
-
],
|
|
94
|
-
'require-await': 'off',
|
|
95
|
-
'@typescript-eslint/require-await': 'error'
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
]
|
|
99
|
-
};
|
|
1
|
+
/** @type {import('eslint').Linter.Config} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
env: {
|
|
4
|
+
browser: true,
|
|
5
|
+
es2021: true
|
|
6
|
+
},
|
|
7
|
+
extends: [
|
|
8
|
+
'airbnb-base',
|
|
9
|
+
'plugin:eslint-comments/recommended',
|
|
10
|
+
'plugin:promise/recommended',
|
|
11
|
+
'plugin:prettier/recommended'
|
|
12
|
+
],
|
|
13
|
+
plugins: ['simple-import-sort', 'prettier'],
|
|
14
|
+
ignorePatterns: ['dist', 'coverage'],
|
|
15
|
+
parserOptions: {
|
|
16
|
+
ecmaVersion: 'latest',
|
|
17
|
+
sourceType: 'module'
|
|
18
|
+
},
|
|
19
|
+
rules: {
|
|
20
|
+
'max-len': 'off',
|
|
21
|
+
'consistent-return': 'off',
|
|
22
|
+
'no-shadow': 'off',
|
|
23
|
+
'no-param-reassign': 'warn',
|
|
24
|
+
'no-console': ['warn', { allow: ['info', 'error'] }],
|
|
25
|
+
'sort-imports': 'off',
|
|
26
|
+
'import/order': 'off',
|
|
27
|
+
'import/extensions': 'off',
|
|
28
|
+
'import/prefer-default-export': 'off',
|
|
29
|
+
'import/no-extraneous-dependencies': 'off',
|
|
30
|
+
'simple-import-sort/exports': 'error',
|
|
31
|
+
'simple-import-sort/imports': [
|
|
32
|
+
'error',
|
|
33
|
+
{
|
|
34
|
+
groups: [
|
|
35
|
+
// External packages:
|
|
36
|
+
['^react', '^@?\\w'],
|
|
37
|
+
// Internal packages:
|
|
38
|
+
['^@(siberiacancodepay-core/.*|$)'],
|
|
39
|
+
// Alias imports:
|
|
40
|
+
['^@(([\\/.]?\\w)|assets|test-utils)'],
|
|
41
|
+
// Side effect imports:
|
|
42
|
+
['^\\u0000'],
|
|
43
|
+
// Parent imports:
|
|
44
|
+
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
|
|
45
|
+
// Other relative imports:
|
|
46
|
+
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
|
|
47
|
+
// Style imports:
|
|
48
|
+
['^.+\\.s?css$']
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
'require-await': 'error'
|
|
53
|
+
},
|
|
54
|
+
overrides: [
|
|
55
|
+
{
|
|
56
|
+
files: ['*.ts', '*.tsx'],
|
|
57
|
+
parser: '@typescript-eslint/parser',
|
|
58
|
+
parserOptions: {
|
|
59
|
+
project: './tsconfig.json'
|
|
60
|
+
},
|
|
61
|
+
extends: [
|
|
62
|
+
'airbnb-typescript/base',
|
|
63
|
+
'plugin:@typescript-eslint/recommended',
|
|
64
|
+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
65
|
+
'plugin:prettier/recommended'
|
|
66
|
+
],
|
|
67
|
+
settings: {
|
|
68
|
+
'import/parsers': {
|
|
69
|
+
'@typescript-eslint/parser': ['.ts', '.tsx']
|
|
70
|
+
},
|
|
71
|
+
'import/resolver': {
|
|
72
|
+
typescript: {
|
|
73
|
+
project: './tsconfig.json'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
rules: {
|
|
78
|
+
'import/order': 'off',
|
|
79
|
+
'import/extensions': 'off',
|
|
80
|
+
'import/prefer-default-export': 'off',
|
|
81
|
+
'import/no-extraneous-dependencies': 'off',
|
|
82
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
83
|
+
'@typescript-eslint/no-unsafe-return': 'off',
|
|
84
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
85
|
+
'@typescript-eslint/no-shadow': 'off',
|
|
86
|
+
'@typescript-eslint/restrict-template-expressions': [
|
|
87
|
+
'warn',
|
|
88
|
+
{ allowBoolean: true, allowNullish: true }
|
|
89
|
+
],
|
|
90
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
91
|
+
'error',
|
|
92
|
+
{ prefer: 'type-imports', disallowTypeAnnotations: false }
|
|
93
|
+
],
|
|
94
|
+
'require-await': 'off',
|
|
95
|
+
'@typescript-eslint/require-await': 'error'
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
]
|
|
99
|
+
};
|
package/.eslintrc.react.js
CHANGED
|
@@ -1,110 +1,110 @@
|
|
|
1
|
-
/** @type {import('eslint').Linter.Config} */
|
|
2
|
-
module.exports = {
|
|
3
|
-
env: {
|
|
4
|
-
browser: true,
|
|
5
|
-
es2021: true
|
|
6
|
-
},
|
|
7
|
-
extends: [
|
|
8
|
-
'airbnb',
|
|
9
|
-
'airbnb/hooks',
|
|
10
|
-
'plugin:eslint-comments/recommended',
|
|
11
|
-
'plugin:promise/recommended',
|
|
12
|
-
'plugin:prettier/recommended'
|
|
13
|
-
],
|
|
14
|
-
plugins: ['simple-import-sort', 'prettier'],
|
|
15
|
-
ignorePatterns: ['dist', 'coverage'],
|
|
16
|
-
parserOptions: {
|
|
17
|
-
ecmaFeatures: { jsx: true },
|
|
18
|
-
ecmaVersion: 'latest',
|
|
19
|
-
sourceType: 'module'
|
|
20
|
-
},
|
|
21
|
-
rules: {
|
|
22
|
-
'max-len': 'off',
|
|
23
|
-
'consistent-return': 'off',
|
|
24
|
-
'no-shadow': 'off',
|
|
25
|
-
'no-param-reassign': 'warn',
|
|
26
|
-
'no-template-curly-in-string': 'off',
|
|
27
|
-
'no-console': ['warn', { allow: ['info', 'error'] }],
|
|
28
|
-
'react/prop-types': 'off',
|
|
29
|
-
'react/jsx-indent': 'off',
|
|
30
|
-
'react/no-children-prop': 'off',
|
|
31
|
-
'react/react-in-jsx-scope': 'off',
|
|
32
|
-
'react/no-unused-prop-types': 'off',
|
|
33
|
-
'react/require-default-props': 'off',
|
|
34
|
-
'react/jsx-props-no-spreading': 'off',
|
|
35
|
-
'react/button-has-type': 'warn',
|
|
36
|
-
'react/no-array-index-key': 'warn',
|
|
37
|
-
'react-hooks/exhaustive-deps': 'warn',
|
|
38
|
-
'react/function-component-definition': [
|
|
39
|
-
'error',
|
|
40
|
-
{
|
|
41
|
-
namedComponents: ['arrow-function'],
|
|
42
|
-
unnamedComponents: 'arrow-function'
|
|
43
|
-
}
|
|
44
|
-
],
|
|
45
|
-
'react/jsx-no-useless-fragment': ['error', { allowExpressions: true }],
|
|
46
|
-
'sort-imports': 'off',
|
|
47
|
-
'import/order': 'off',
|
|
48
|
-
'import/extensions': 'off',
|
|
49
|
-
'import/prefer-default-export': 'off',
|
|
50
|
-
'import/no-extraneous-dependencies': 'off',
|
|
51
|
-
'simple-import-sort/exports': 'error',
|
|
52
|
-
'simple-import-sort/imports': [
|
|
53
|
-
'error',
|
|
54
|
-
{
|
|
55
|
-
groups: [
|
|
56
|
-
// External packages:
|
|
57
|
-
['^react', '^@?\\w'],
|
|
58
|
-
// Internal packages:
|
|
59
|
-
['^@(
|
|
60
|
-
// Alias imports:
|
|
61
|
-
['^@(([\\/.]?\\w)|assets|test-utils)'],
|
|
62
|
-
// Side effect imports:
|
|
63
|
-
['^\\u0000'],
|
|
64
|
-
// Parent imports:
|
|
65
|
-
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
|
|
66
|
-
// Other relative imports:
|
|
67
|
-
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
|
|
68
|
-
// Style imports:
|
|
69
|
-
['^.+\\.s?css$']
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
'require-await': 'error'
|
|
74
|
-
},
|
|
75
|
-
overrides: [
|
|
76
|
-
{
|
|
77
|
-
files: ['*.ts', '*.tsx'],
|
|
78
|
-
parser: '@typescript-eslint/parser',
|
|
79
|
-
parserOptions: {
|
|
80
|
-
project: './tsconfig.json'
|
|
81
|
-
},
|
|
82
|
-
extends: [
|
|
83
|
-
'airbnb-typescript',
|
|
84
|
-
'plugin:@typescript-eslint/recommended',
|
|
85
|
-
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
86
|
-
'plugin:prettier/recommended'
|
|
87
|
-
],
|
|
88
|
-
rules: {
|
|
89
|
-
'import/order': 'off',
|
|
90
|
-
'import/extensions': 'off',
|
|
91
|
-
'import/prefer-default-export': 'off',
|
|
92
|
-
'import/no-extraneous-dependencies': 'off',
|
|
93
|
-
'@typescript-eslint/no-explicit-any': 'off',
|
|
94
|
-
'@typescript-eslint/no-unsafe-return': 'off',
|
|
95
|
-
'@typescript-eslint/ban-ts-comment': 'off',
|
|
96
|
-
'@typescript-eslint/no-shadow': 'off',
|
|
97
|
-
'@typescript-eslint/restrict-template-expressions': [
|
|
98
|
-
'warn',
|
|
99
|
-
{ allowBoolean: true, allowNullish: true }
|
|
100
|
-
],
|
|
101
|
-
'@typescript-eslint/consistent-type-imports': [
|
|
102
|
-
'error',
|
|
103
|
-
{ prefer: 'type-imports', disallowTypeAnnotations: false }
|
|
104
|
-
],
|
|
105
|
-
'require-await': 'off',
|
|
106
|
-
'@typescript-eslint/require-await': 'error'
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
]
|
|
110
|
-
};
|
|
1
|
+
/** @type {import('eslint').Linter.Config} */
|
|
2
|
+
module.exports = {
|
|
3
|
+
env: {
|
|
4
|
+
browser: true,
|
|
5
|
+
es2021: true
|
|
6
|
+
},
|
|
7
|
+
extends: [
|
|
8
|
+
'airbnb',
|
|
9
|
+
'airbnb/hooks',
|
|
10
|
+
'plugin:eslint-comments/recommended',
|
|
11
|
+
'plugin:promise/recommended',
|
|
12
|
+
'plugin:prettier/recommended'
|
|
13
|
+
],
|
|
14
|
+
plugins: ['simple-import-sort', 'prettier'],
|
|
15
|
+
ignorePatterns: ['dist', 'coverage'],
|
|
16
|
+
parserOptions: {
|
|
17
|
+
ecmaFeatures: { jsx: true },
|
|
18
|
+
ecmaVersion: 'latest',
|
|
19
|
+
sourceType: 'module'
|
|
20
|
+
},
|
|
21
|
+
rules: {
|
|
22
|
+
'max-len': 'off',
|
|
23
|
+
'consistent-return': 'off',
|
|
24
|
+
'no-shadow': 'off',
|
|
25
|
+
'no-param-reassign': 'warn',
|
|
26
|
+
'no-template-curly-in-string': 'off',
|
|
27
|
+
'no-console': ['warn', { allow: ['info', 'error'] }],
|
|
28
|
+
'react/prop-types': 'off',
|
|
29
|
+
'react/jsx-indent': 'off',
|
|
30
|
+
'react/no-children-prop': 'off',
|
|
31
|
+
'react/react-in-jsx-scope': 'off',
|
|
32
|
+
'react/no-unused-prop-types': 'off',
|
|
33
|
+
'react/require-default-props': 'off',
|
|
34
|
+
'react/jsx-props-no-spreading': 'off',
|
|
35
|
+
'react/button-has-type': 'warn',
|
|
36
|
+
'react/no-array-index-key': 'warn',
|
|
37
|
+
'react-hooks/exhaustive-deps': 'warn',
|
|
38
|
+
'react/function-component-definition': [
|
|
39
|
+
'error',
|
|
40
|
+
{
|
|
41
|
+
namedComponents: ['arrow-function'],
|
|
42
|
+
unnamedComponents: 'arrow-function'
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
'react/jsx-no-useless-fragment': ['error', { allowExpressions: true }],
|
|
46
|
+
'sort-imports': 'off',
|
|
47
|
+
'import/order': 'off',
|
|
48
|
+
'import/extensions': 'off',
|
|
49
|
+
'import/prefer-default-export': 'off',
|
|
50
|
+
'import/no-extraneous-dependencies': 'off',
|
|
51
|
+
'simple-import-sort/exports': 'error',
|
|
52
|
+
'simple-import-sort/imports': [
|
|
53
|
+
'error',
|
|
54
|
+
{
|
|
55
|
+
groups: [
|
|
56
|
+
// External packages:
|
|
57
|
+
['^react', '^@?\\w'],
|
|
58
|
+
// Internal packages:
|
|
59
|
+
['^@(siberiacancodepay-core/.*|$)'],
|
|
60
|
+
// Alias imports:
|
|
61
|
+
['^@(([\\/.]?\\w)|assets|test-utils)'],
|
|
62
|
+
// Side effect imports:
|
|
63
|
+
['^\\u0000'],
|
|
64
|
+
// Parent imports:
|
|
65
|
+
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
|
|
66
|
+
// Other relative imports:
|
|
67
|
+
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
|
|
68
|
+
// Style imports:
|
|
69
|
+
['^.+\\.s?css$']
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
'require-await': 'error'
|
|
74
|
+
},
|
|
75
|
+
overrides: [
|
|
76
|
+
{
|
|
77
|
+
files: ['*.ts', '*.tsx'],
|
|
78
|
+
parser: '@typescript-eslint/parser',
|
|
79
|
+
parserOptions: {
|
|
80
|
+
project: './tsconfig.json'
|
|
81
|
+
},
|
|
82
|
+
extends: [
|
|
83
|
+
'airbnb-typescript',
|
|
84
|
+
'plugin:@typescript-eslint/recommended',
|
|
85
|
+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
86
|
+
'plugin:prettier/recommended'
|
|
87
|
+
],
|
|
88
|
+
rules: {
|
|
89
|
+
'import/order': 'off',
|
|
90
|
+
'import/extensions': 'off',
|
|
91
|
+
'import/prefer-default-export': 'off',
|
|
92
|
+
'import/no-extraneous-dependencies': 'off',
|
|
93
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
94
|
+
'@typescript-eslint/no-unsafe-return': 'off',
|
|
95
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
96
|
+
'@typescript-eslint/no-shadow': 'off',
|
|
97
|
+
'@typescript-eslint/restrict-template-expressions': [
|
|
98
|
+
'warn',
|
|
99
|
+
{ allowBoolean: true, allowNullish: true }
|
|
100
|
+
],
|
|
101
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
102
|
+
'error',
|
|
103
|
+
{ prefer: 'type-imports', disallowTypeAnnotations: false }
|
|
104
|
+
],
|
|
105
|
+
'require-await': 'off',
|
|
106
|
+
'@typescript-eslint/require-await': 'error'
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@siberiacancode/eslint",
|
|
3
3
|
"description": "eslint configs",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.0.
|
|
5
|
+
"version": "1.0.2",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"eslint",
|
|
8
8
|
"react",
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
"eslint-plugin-simple-import-sort": "^10.0.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@siberiacancode/prettier": "*"
|
|
58
|
-
"eslint": "^8.2.0"
|
|
57
|
+
"@siberiacancode/prettier": "*"
|
|
59
58
|
}
|
|
60
59
|
}
|