@shelf/eslint-config 2.10.3 → 2.12.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/frontend.js +9 -2
- package/package.json +10 -9
- package/typescript.js +3 -3
package/frontend.js
CHANGED
|
@@ -2,8 +2,14 @@ const env = require('./common/env');
|
|
|
2
2
|
const baseConfig = require('./base');
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
5
|
-
extends: [
|
|
6
|
-
|
|
5
|
+
extends: [
|
|
6
|
+
'./base.js',
|
|
7
|
+
'plugin:react/recommended',
|
|
8
|
+
'prettier',
|
|
9
|
+
'plugin:react-hooks/recommended',
|
|
10
|
+
'plugin:sonarjs/recommended',
|
|
11
|
+
],
|
|
12
|
+
plugins: ['react', 'import', 'sonarjs'],
|
|
7
13
|
env: {
|
|
8
14
|
browser: true,
|
|
9
15
|
...env,
|
|
@@ -17,5 +23,6 @@ module.exports = {
|
|
|
17
23
|
rules: {
|
|
18
24
|
...baseConfig.rules,
|
|
19
25
|
'no-console': 'error',
|
|
26
|
+
'sonarjs/cognitive-complexity': ['error', 18],
|
|
20
27
|
},
|
|
21
28
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shelf/eslint-config",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.0",
|
|
4
4
|
"description": "ESLint Config for Shelf Projects",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "shelfio/eslint-config",
|
|
@@ -33,25 +33,26 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/eslint-parser": "7.16.5",
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
37
|
-
"@typescript-eslint/parser": "5.
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "5.10.2",
|
|
37
|
+
"@typescript-eslint/parser": "5.10.2",
|
|
38
38
|
"eslint-config-next": "11.1.2",
|
|
39
39
|
"eslint-config-prettier": "8.3.0",
|
|
40
40
|
"eslint-plugin-babel": "5.3.1",
|
|
41
|
-
"eslint-plugin-import": "2.25.
|
|
42
|
-
"eslint-plugin-jest": "
|
|
41
|
+
"eslint-plugin-import": "2.25.4",
|
|
42
|
+
"eslint-plugin-jest": "26.0.0",
|
|
43
43
|
"eslint-plugin-jest-formatting": "3.1.0",
|
|
44
44
|
"eslint-plugin-json-format": "2.0.1",
|
|
45
45
|
"eslint-plugin-jsx": "0.1.0",
|
|
46
46
|
"eslint-plugin-prettier": "4.0.0",
|
|
47
|
-
"eslint-plugin-react": "7.
|
|
47
|
+
"eslint-plugin-react": "7.28.0",
|
|
48
48
|
"eslint-plugin-react-hooks": "4.3.0",
|
|
49
|
-
"eslint-plugin-
|
|
50
|
-
"eslint-plugin-
|
|
49
|
+
"eslint-plugin-sonarjs": "0.11.0",
|
|
50
|
+
"eslint-plugin-testing-library": "5.0.5",
|
|
51
|
+
"eslint-plugin-vue": "8.4.0"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
54
|
"husky": "7.0.4",
|
|
54
|
-
"lint-staged": "12.
|
|
55
|
+
"lint-staged": "12.3.3",
|
|
55
56
|
"prettier": "2.5.1"
|
|
56
57
|
},
|
|
57
58
|
"peerDependencies": {
|
package/typescript.js
CHANGED
|
@@ -22,7 +22,6 @@ module.exports = {
|
|
|
22
22
|
curly: 'error',
|
|
23
23
|
'no-nested-ternary': 'error',
|
|
24
24
|
'prettier/prettier': 'error',
|
|
25
|
-
'@typescript-eslint/no-use-before-define': 0,
|
|
26
25
|
'@typescript-eslint/camelcase': 0,
|
|
27
26
|
'padding-line-between-statements': paddingLineBetweenStatements,
|
|
28
27
|
...jestRules,
|
|
@@ -37,11 +36,12 @@ module.exports = {
|
|
|
37
36
|
...consistentTypeAssertions,
|
|
38
37
|
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
|
|
39
38
|
'@typescript-eslint/no-non-null-assertion': 'off', // we want to allow using the "!" operator
|
|
40
|
-
camelcase: ['error', {properties: 'never', ignoreGlobals: true}],
|
|
39
|
+
camelcase: ['error', {properties: 'never', ignoreGlobals: true, allow: ['hash_key', 'range_key']}],
|
|
41
40
|
eqeqeq: ['error', 'smart'],
|
|
42
41
|
'new-cap': 'error',
|
|
43
42
|
'no-extend-native': 'error',
|
|
44
|
-
'no-use-before-define':
|
|
43
|
+
'no-use-before-define': 'off',
|
|
44
|
+
'@typescript-eslint/no-use-before-define': ['error', {functions: false, classes: true, variables: true, typedefs: false, ignoreTypeReferences: true}],
|
|
45
45
|
...consistentTypeImports,
|
|
46
46
|
'multiline-comment-style': ['error', 'separate-lines'],
|
|
47
47
|
'arrow-body-style': ['error', 'as-needed', {requireReturnForObjectLiteral: true }],
|