@fullstacksjs/eslint-config 8.9.0 → 8.10.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/nextjs.js +1 -9
- package/package.json +17 -17
- package/rules/base.js +17 -16
- package/rules/forbidden.js +1 -0
- package/rules/promise.js +1 -0
- package/rules/typescript-requiring-type-checking.js +6 -1
- package/rules/typescript.js +3 -2
package/nextjs.js
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
const
|
|
2
|
-
const { Packages } = require('@frontendmonster/utils');
|
|
3
|
-
const readPkgUp = require('read-pkg-up');
|
|
4
|
-
|
|
5
|
-
const { packageJson: pkg } = readPkgUp.sync({
|
|
6
|
-
cwd: fs.realpathSync(process.cwd()),
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
const packages = Packages(pkg);
|
|
1
|
+
const packages = require('./packages');
|
|
10
2
|
|
|
11
3
|
/** @type { import('eslint').Linter.Config } */
|
|
12
4
|
module.exports = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullstacksjs/eslint-config",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "fullstacks <fullstacksjs@gmail.com>",
|
|
6
6
|
"description": "fullstacks eslint config",
|
|
@@ -47,42 +47,42 @@
|
|
|
47
47
|
},
|
|
48
48
|
"main": "index.js",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@fullstacksjs/toolbox": "
|
|
51
|
-
"@graphql-eslint/eslint-plugin": "3.
|
|
52
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
53
|
-
"@typescript-eslint/parser": "5.
|
|
50
|
+
"@fullstacksjs/toolbox": "3.0.2",
|
|
51
|
+
"@graphql-eslint/eslint-plugin": "3.13.1",
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "5.46.1",
|
|
53
|
+
"@typescript-eslint/parser": "5.46.1",
|
|
54
54
|
"eslint-config-prettier": "8.5.0",
|
|
55
|
-
"eslint-import-resolver-typescript": "3.5.
|
|
55
|
+
"eslint-import-resolver-typescript": "3.5.2",
|
|
56
56
|
"eslint-plugin-cypress": "2.12.1",
|
|
57
57
|
"eslint-plugin-fp": "2.3.0",
|
|
58
58
|
"eslint-plugin-import": "2.26.0",
|
|
59
|
-
"eslint-plugin-jest": "27.1.
|
|
59
|
+
"eslint-plugin-jest": "27.1.7",
|
|
60
60
|
"eslint-plugin-jest-formatting": "3.1.0",
|
|
61
61
|
"eslint-plugin-jsx-a11y": "6.6.1",
|
|
62
62
|
"eslint-plugin-node": "11.1.0",
|
|
63
63
|
"eslint-plugin-prettier": "4.2.1",
|
|
64
|
-
"eslint-plugin-promise": "6.
|
|
65
|
-
"eslint-plugin-react": "7.31.
|
|
64
|
+
"eslint-plugin-promise": "6.1.1",
|
|
65
|
+
"eslint-plugin-react": "7.31.11",
|
|
66
66
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
67
67
|
"eslint-plugin-simple-import-sort": "8.0.0",
|
|
68
|
-
"eslint-plugin-storybook": "0.6.
|
|
68
|
+
"eslint-plugin-storybook": "0.6.8",
|
|
69
69
|
"read-pkg-up": "7.0.1"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@semantic-release/github": "8.0.
|
|
72
|
+
"@semantic-release/github": "8.0.7",
|
|
73
73
|
"@semantic-release/npm": "9.0.1",
|
|
74
74
|
"@semantic-release/release-notes-generator": "10.0.3",
|
|
75
|
-
"cspell": "6.
|
|
76
|
-
"eslint": "8.
|
|
75
|
+
"cspell": "6.17.0",
|
|
76
|
+
"eslint": "8.29.0",
|
|
77
77
|
"eslint-find-rules": "4.1.0",
|
|
78
|
-
"husky": "8.0.
|
|
79
|
-
"lint-staged": "13.0
|
|
78
|
+
"husky": "8.0.2",
|
|
79
|
+
"lint-staged": "13.1.0",
|
|
80
80
|
"np": "7.6.2",
|
|
81
81
|
"npm-run-all": "4.1.5",
|
|
82
82
|
"pinst": "3.0.0",
|
|
83
|
-
"prettier": "2.
|
|
83
|
+
"prettier": "2.8.1",
|
|
84
84
|
"semantic-release": "19.0.5",
|
|
85
|
-
"typescript": "4.
|
|
85
|
+
"typescript": "4.9.4"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
88
|
"cypress": ">=8",
|
package/rules/base.js
CHANGED
|
@@ -8,14 +8,20 @@ module.exports = {
|
|
|
8
8
|
'default-case': 'error',
|
|
9
9
|
'dot-notation': 'error',
|
|
10
10
|
'eqeqeq': ['error', 'smart'],
|
|
11
|
+
'grouped-accessor-pairs': 'off',
|
|
11
12
|
'guard-for-in': 'error',
|
|
12
13
|
'no-alert': 'error',
|
|
14
|
+
'no-async-promise-executor': 'off',
|
|
13
15
|
'no-caller': 'error',
|
|
14
16
|
'no-case-declarations': 'error',
|
|
17
|
+
'no-console': 'off',
|
|
18
|
+
'no-constructor-return': 'error',
|
|
15
19
|
'no-div-regex': 'error',
|
|
20
|
+
'no-dupe-else-if': 'error',
|
|
16
21
|
'no-else-return': 'off',
|
|
17
22
|
'no-empty-function': 'off',
|
|
18
23
|
'no-empty-pattern': 'error',
|
|
24
|
+
'no-empty-static-block': 'warn',
|
|
19
25
|
'no-eq-null': 'off',
|
|
20
26
|
'no-eval': 'error',
|
|
21
27
|
'no-extend-native': 'error',
|
|
@@ -27,6 +33,7 @@ module.exports = {
|
|
|
27
33
|
'no-implicit-coercion': 'off',
|
|
28
34
|
'no-implicit-globals': 'error',
|
|
29
35
|
'no-implied-eval': 'error',
|
|
36
|
+
'no-import-assign': 'error',
|
|
30
37
|
'no-invalid-this': 'warn',
|
|
31
38
|
'no-iterator': 'error',
|
|
32
39
|
'no-labels': 'error',
|
|
@@ -34,23 +41,25 @@ module.exports = {
|
|
|
34
41
|
'no-loop-func': 'error',
|
|
35
42
|
'no-loss-of-precision': 'warn',
|
|
36
43
|
'no-magic-numbers': 'off',
|
|
44
|
+
'no-misleading-character-class': 'off',
|
|
37
45
|
'no-multi-str': 'error',
|
|
46
|
+
'no-new': 'error',
|
|
38
47
|
'no-new-func': 'error',
|
|
39
48
|
'no-new-wrappers': 'error',
|
|
40
|
-
'no-new': 'error',
|
|
41
|
-
'no-octal-escape': 'error',
|
|
42
49
|
'no-octal': 'error',
|
|
50
|
+
'no-octal-escape': 'error',
|
|
43
51
|
'no-param-reassign': 'off',
|
|
44
52
|
'no-proto': 'error',
|
|
45
53
|
'no-redeclare': 'error',
|
|
46
|
-
'no-restricted-properties': 'off',
|
|
47
54
|
'no-restricted-exports': 'off',
|
|
55
|
+
'no-restricted-properties': 'off',
|
|
48
56
|
'no-restricted-syntax': ['error', 'WithStatement'],
|
|
49
57
|
'no-return-assign': 'error',
|
|
50
58
|
'no-script-url': 'error',
|
|
51
59
|
'no-self-assign': 'error',
|
|
52
60
|
'no-self-compare': 'error',
|
|
53
61
|
'no-sequences': 'error',
|
|
62
|
+
'no-setter-return': 'error',
|
|
54
63
|
'no-throw-literal': 'error',
|
|
55
64
|
'no-unmodified-loop-condition': 'error',
|
|
56
65
|
'no-unsafe-optional-chaining': 'error',
|
|
@@ -64,23 +73,15 @@ module.exports = {
|
|
|
64
73
|
'no-void': 'off',
|
|
65
74
|
'no-warning-comments': ['warn', { terms: ['fixme'], location: 'anywhere' }],
|
|
66
75
|
'no-with': 'off',
|
|
67
|
-
'prefer-promise-reject-errors': 'off',
|
|
68
76
|
'prefer-named-capture-group': 'off',
|
|
77
|
+
'prefer-promise-reject-errors': 'off',
|
|
78
|
+
'prefer-regex-literals': 'off',
|
|
69
79
|
'radix': 'error',
|
|
70
|
-
'require-await': 'error',
|
|
71
|
-
'vars-on-top': 'error',
|
|
72
|
-
'yoda': 'error',
|
|
73
80
|
'require-atomic-updates': 'off',
|
|
81
|
+
'require-await': 'error',
|
|
74
82
|
'require-unicode-regexp': 'off',
|
|
75
|
-
'no-misleading-character-class': 'off',
|
|
76
|
-
'no-async-promise-executor': 'off',
|
|
77
|
-
'no-console': 'off',
|
|
78
|
-
'no-constructor-return': 'error',
|
|
79
|
-
'no-dupe-else-if': 'error',
|
|
80
|
-
'no-import-assign': 'error',
|
|
81
|
-
'no-setter-return': 'error',
|
|
82
|
-
'prefer-regex-literals': 'off',
|
|
83
|
-
'grouped-accessor-pairs': 'off',
|
|
84
83
|
'strict': 'error',
|
|
84
|
+
'vars-on-top': 'error',
|
|
85
|
+
'yoda': 'error',
|
|
85
86
|
},
|
|
86
87
|
};
|
package/rules/forbidden.js
CHANGED
|
@@ -20,6 +20,7 @@ module.exports = {
|
|
|
20
20
|
'no-inner-declarations': 'error',
|
|
21
21
|
'no-invalid-regexp': 'error',
|
|
22
22
|
'no-irregular-whitespace': 'error',
|
|
23
|
+
'no-new-native-nonconstructor': 'error',
|
|
23
24
|
'no-nonoctal-decimal-escape': 'error',
|
|
24
25
|
'no-obj-calls': 'error',
|
|
25
26
|
'no-prototype-builtins': 'off',
|
package/rules/promise.js
CHANGED
|
@@ -30,7 +30,12 @@ module.exports = {
|
|
|
30
30
|
'@typescript-eslint/prefer-reduce-type-parameter': 'warn',
|
|
31
31
|
'@typescript-eslint/prefer-nullish-coalescing': [
|
|
32
32
|
'warn',
|
|
33
|
-
{
|
|
33
|
+
{
|
|
34
|
+
ignoreConditionalTests: false,
|
|
35
|
+
ignoreTernaryTests: false,
|
|
36
|
+
ignoreMixedLogicalExpressions: false,
|
|
37
|
+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
|
|
38
|
+
},
|
|
34
39
|
],
|
|
35
40
|
'@typescript-eslint/prefer-regexp-exec': 'warn',
|
|
36
41
|
'@typescript-eslint/prefer-return-this-type': 'warn',
|
package/rules/typescript.js
CHANGED
|
@@ -100,13 +100,13 @@ module.exports = {
|
|
|
100
100
|
'@typescript-eslint/no-magic-numbers': ['off', { ignoreEnums: true }], // Not good enough yet
|
|
101
101
|
'@typescript-eslint/no-misused-new': 'error',
|
|
102
102
|
'@typescript-eslint/no-namespace': 'error',
|
|
103
|
+
'@typescript-eslint/consistent-type-imports': ['warn', { prefer: 'type-imports', disallowTypeAnnotations: false }],
|
|
103
104
|
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
|
|
104
105
|
'@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
|
|
105
106
|
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
106
107
|
'@typescript-eslint/no-redeclare': ['off', { ignoreDeclarationMerge: true }], // useful in FP.
|
|
107
108
|
'@typescript-eslint/no-require-imports': 'error',
|
|
108
109
|
'@typescript-eslint/no-restricted-imports': 'off',
|
|
109
|
-
'@typescript-eslint/consistent-type-imports': ['warn', { prefer: 'type-imports', disallowTypeAnnotations: false }],
|
|
110
110
|
'@typescript-eslint/no-shadow': 'error',
|
|
111
111
|
'@typescript-eslint/no-this-alias': 'error',
|
|
112
112
|
'@typescript-eslint/no-type-alias': 'off',
|
|
@@ -114,6 +114,7 @@ module.exports = {
|
|
|
114
114
|
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
115
115
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
116
116
|
'@typescript-eslint/no-unsafe-call': 'off',
|
|
117
|
+
'@typescript-eslint/no-unsafe-declaration-merging': 'warn',
|
|
117
118
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
118
119
|
'@typescript-eslint/no-unsafe-return': 'off',
|
|
119
120
|
'@typescript-eslint/no-untyped-public-signature': 'off',
|
|
@@ -157,7 +158,7 @@ module.exports = {
|
|
|
157
158
|
'off',
|
|
158
159
|
{ allowNumber: true, allowBoolean: false, allowAny: false, allowNullish: false, allowRegExp: false },
|
|
159
160
|
],
|
|
160
|
-
'@typescript-eslint/sort-type-
|
|
161
|
+
'@typescript-eslint/sort-type-constituents': [
|
|
161
162
|
'warn',
|
|
162
163
|
{
|
|
163
164
|
checkIntersections: true,
|