@shlinkio/eslint-config-js-coding-standard 2.4.1 → 2.5.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/dist/index.js +34 -23
- package/package.json +8 -9
package/dist/index.js
CHANGED
|
@@ -1,20 +1,48 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
extends: [
|
|
3
|
-
'
|
|
4
|
-
'airbnb-typescript',
|
|
3
|
+
'eslint:recommended',
|
|
5
4
|
'plugin:@typescript-eslint/recommended',
|
|
5
|
+
'plugin:react/recommended',
|
|
6
|
+
'plugin:react/jsx-runtime',
|
|
6
7
|
'plugin:react-hooks/recommended'
|
|
7
8
|
],
|
|
8
|
-
plugins: ['simple-import-sort'],
|
|
9
|
+
plugins: ['jsx-a11y', 'simple-import-sort', '@stylistic'],
|
|
10
|
+
parserOptions: {
|
|
11
|
+
ecmaFeatures: {
|
|
12
|
+
jsx: true
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
settings: {
|
|
16
|
+
react: {
|
|
17
|
+
version: 'detect'
|
|
18
|
+
}
|
|
19
|
+
},
|
|
9
20
|
rules: {
|
|
10
21
|
// Customize rules or add on top of presets
|
|
11
|
-
'
|
|
22
|
+
'@stylistic/arrow-parens': 'error',
|
|
23
|
+
'@stylistic/arrow-spacing': 'error',
|
|
24
|
+
'@stylistic/block-spacing': 'error',
|
|
25
|
+
'@stylistic/comma-dangle': ['error', 'always-multiline'],
|
|
26
|
+
'@stylistic/eol-last': 'error',
|
|
27
|
+
'@stylistic/function-call-spacing': 'error',
|
|
28
|
+
'@stylistic/indent': ['error', 2],
|
|
29
|
+
'@stylistic/key-spacing': 'error',
|
|
30
|
+
'@stylistic/keyword-spacing': 'error',
|
|
31
|
+
'@stylistic/max-len': [
|
|
12
32
|
'error',
|
|
13
33
|
{ 'code': 120, 'ignoreComments': true, 'ignoreStrings': true, 'ignoreTemplateLiterals': true },
|
|
14
34
|
],
|
|
35
|
+
'@stylistic/no-trailing-spaces': 'error',
|
|
36
|
+
'@stylistic/object-curly-spacing': ['error', 'always'],
|
|
37
|
+
'@stylistic/quotes': ['error', 'single'],
|
|
38
|
+
'@stylistic/jsx-quotes': ['error', 'prefer-double'],
|
|
39
|
+
'@stylistic/rest-spread-spacing': 'error',
|
|
40
|
+
'@stylistic/semi': 'error',
|
|
41
|
+
'@stylistic/spaced-comment': 'error',
|
|
15
42
|
'@typescript-eslint/consistent-type-imports': 'error',
|
|
16
43
|
'simple-import-sort/imports': ['error', {
|
|
17
44
|
'groups': [
|
|
45
|
+
// First external imports, then local imports, then styles imports
|
|
18
46
|
['^', '^\\.', '\\.s?css$']
|
|
19
47
|
]
|
|
20
48
|
}],
|
|
@@ -29,27 +57,10 @@ module.exports = {
|
|
|
29
57
|
}],
|
|
30
58
|
|
|
31
59
|
// Disabled rules from presets
|
|
32
|
-
'
|
|
33
|
-
'implicit-arrow-linebreak': 'off',
|
|
34
|
-
'no-restricted-globals': 'off',
|
|
35
|
-
'default-case': 'off',
|
|
36
|
-
'import/no-cycle': 'off',
|
|
37
|
-
'import/prefer-default-export': 'off',
|
|
38
|
-
'import/no-extraneous-dependencies': 'off',
|
|
39
|
-
'react/react-in-jsx-scope': 'off',
|
|
60
|
+
'react/display-name': ['off', { 'ignoreTranspilerName': false }],
|
|
40
61
|
'react/prop-types': 'off',
|
|
41
|
-
'react/require-default-props': 'off',
|
|
42
|
-
'react/no-unused-prop-types': 'off',
|
|
43
|
-
'react/function-component-definition': 'off',
|
|
44
|
-
'react/no-array-index-key': 'off',
|
|
45
|
-
'react/no-unstable-nested-components': 'off',
|
|
46
|
-
'react/jsx-one-expression-per-line': 'off',
|
|
47
|
-
'react/jsx-props-no-spreading': 'off',
|
|
48
|
-
'react/jsx-no-useless-fragment': 'off',
|
|
49
|
-
'@typescript-eslint/no-unused-expressions': 'off',
|
|
50
62
|
'@typescript-eslint/ban-types': 'off',
|
|
51
|
-
'@typescript-eslint/no-explicit-any': 'off'
|
|
52
|
-
'@typescript-eslint/lines-between-class-members': 'off'
|
|
63
|
+
'@typescript-eslint/no-explicit-any': 'off'
|
|
53
64
|
},
|
|
54
65
|
overrides: [
|
|
55
66
|
{
|
package/package.json
CHANGED
|
@@ -21,22 +21,21 @@
|
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "mkdir -p dist && rm -rf dist/* && cp index.js dist"
|
|
23
23
|
},
|
|
24
|
-
"dependencies": {
|
|
25
|
-
"eslint-config-airbnb": "^19.0.4",
|
|
26
|
-
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
27
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
28
|
-
"eslint-plugin-simple-import-sort": "^12.0.0"
|
|
29
|
-
},
|
|
30
24
|
"peerDependencies": {
|
|
25
|
+
"@stylistic/eslint-plugin": "^2.1.0",
|
|
31
26
|
"@typescript-eslint/eslint-plugin": "^7.5.0",
|
|
32
27
|
"@typescript-eslint/parser": "^7.5.0",
|
|
33
|
-
"eslint": "^8.57.0"
|
|
28
|
+
"eslint": "^8.57.0",
|
|
29
|
+
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
30
|
+
"eslint-plugin-react": "^7.34.2",
|
|
31
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
32
|
+
"eslint-plugin-simple-import-sort": "^12.1.0"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
|
-
"typescript": "^5.4.
|
|
35
|
+
"typescript": "^5.4.5"
|
|
37
36
|
},
|
|
38
37
|
"files": [
|
|
39
38
|
"dist"
|
|
40
39
|
],
|
|
41
|
-
"version": "2.
|
|
40
|
+
"version": "2.5.1"
|
|
42
41
|
}
|