@fullstacksjs/eslint-config 7.0.0-0 → 7.0.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/README.md +1 -1
- package/base.js +9 -2
- package/package.json +7 -8
- package/rules/typescript-requiring-type-checking.js +4 -1
- package/rules/typescript.js +3 -2
package/README.md
CHANGED
|
@@ -115,7 +115,7 @@ If you need more advanced `typescript-eslint` rules, then you can extend from `"
|
|
|
115
115
|
* eslint-plugin-simple-import-sort
|
|
116
116
|
* eslint-plugin-fp
|
|
117
117
|
* eslint-plugin-node
|
|
118
|
-
* eslint-plugin-promise
|
|
118
|
+
* ~~eslint-plugin-promise~~ ⚠️ Disabled in v7-beta, because it's not currently supports eslint@8 ([Issue](https://github.com/xjamundx/eslint-plugin-promise/issues/218))
|
|
119
119
|
|
|
120
120
|
That's all. Feel free to use 💛
|
|
121
121
|
|
package/base.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
module.exports = {
|
|
2
|
-
plugins: [
|
|
2
|
+
plugins: [
|
|
3
|
+
'prettier',
|
|
4
|
+
'import',
|
|
5
|
+
'simple-import-sort',
|
|
6
|
+
// 'promise' PENDING: https://github.com/xjamundx/eslint-plugin-promise/issues/218
|
|
7
|
+
'node',
|
|
8
|
+
'fp',
|
|
9
|
+
],
|
|
3
10
|
parserOptions: {
|
|
4
11
|
ecmaVersion: 2020,
|
|
5
12
|
sourceType: 'module',
|
|
@@ -27,7 +34,7 @@ module.exports = {
|
|
|
27
34
|
'./rules/style',
|
|
28
35
|
'./rules/variables',
|
|
29
36
|
'./rules/fp',
|
|
30
|
-
'./rules/promise',
|
|
37
|
+
// './rules/promise', PENDING: https://github.com/xjamundx/eslint-plugin-promise/issues/218
|
|
31
38
|
'./rules/node',
|
|
32
39
|
'prettier',
|
|
33
40
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fullstacksjs/eslint-config",
|
|
3
|
-
"version": "7.0.0
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "fullstacks <fullstacksjs@gmail.com>",
|
|
6
6
|
"description": "fullstacks eslint config",
|
|
@@ -38,19 +38,18 @@
|
|
|
38
38
|
"main": "index.js",
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@frontendmonster/utils": "0.3.11",
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
42
|
-
"@typescript-eslint/parser": "5.
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "5.6.0",
|
|
42
|
+
"@typescript-eslint/parser": "5.6.0",
|
|
43
43
|
"eslint-config-prettier": "8.3.0",
|
|
44
44
|
"eslint-import-resolver-typescript": "2.5.0",
|
|
45
45
|
"eslint-plugin-cypress": "2.12.1",
|
|
46
46
|
"eslint-plugin-fp": "2.3.0",
|
|
47
47
|
"eslint-plugin-import": "2.25.3",
|
|
48
48
|
"eslint-plugin-jest-formatting": "3.1.0",
|
|
49
|
-
"eslint-plugin-jest": "25.
|
|
49
|
+
"eslint-plugin-jest": "25.3.0",
|
|
50
50
|
"eslint-plugin-jsx-a11y": "6.5.1",
|
|
51
51
|
"eslint-plugin-node": "11.1.0",
|
|
52
52
|
"eslint-plugin-prettier": "4.0.0",
|
|
53
|
-
"eslint-plugin-promise": "5.1.1",
|
|
54
53
|
"eslint-plugin-react-hooks": "4.3.0",
|
|
55
54
|
"eslint-plugin-react": "7.27.1",
|
|
56
55
|
"eslint-plugin-simple-import-sort": "7.0.0",
|
|
@@ -58,14 +57,14 @@
|
|
|
58
57
|
"read-pkg-up": "7.0.1"
|
|
59
58
|
},
|
|
60
59
|
"devDependencies": {
|
|
61
|
-
"eslint": "8.
|
|
60
|
+
"eslint": "8.4.1",
|
|
62
61
|
"eslint-find-rules": "4.0.0",
|
|
63
62
|
"husky": "7.0.4",
|
|
64
|
-
"lint-staged": "12.
|
|
63
|
+
"lint-staged": "12.1.2",
|
|
65
64
|
"np": "7.6.0",
|
|
66
65
|
"npm-run-all": "4.1.5",
|
|
67
66
|
"pinst": "2.1.6",
|
|
68
|
-
"prettier": "2.
|
|
67
|
+
"prettier": "2.5.1",
|
|
69
68
|
"typescript": "4.5.2"
|
|
70
69
|
},
|
|
71
70
|
"peerDependencies": {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
rules: {
|
|
3
3
|
'@typescript-eslint/await-thenable': 'error',
|
|
4
|
-
'@typescript-eslint/dot-notation':
|
|
4
|
+
'@typescript-eslint/dot-notation': [
|
|
5
|
+
'warn',
|
|
6
|
+
{ allowPrivateClassPropertyAccess: false, allowProtectedClassPropertyAccess: false, allowIndexSignaturePropertyAccess: true },
|
|
7
|
+
],
|
|
5
8
|
'@typescript-eslint/no-meaningless-void-operator': ['warn', { checkNever: false }],
|
|
6
9
|
'@typescript-eslint/no-confusing-void-expression': ['warn', { ignoreArrowShorthand: true, ignoreVoidOperator: true }],
|
|
7
10
|
'@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
|
package/rules/typescript.js
CHANGED
|
@@ -57,7 +57,7 @@ module.exports = {
|
|
|
57
57
|
'@typescript-eslint/no-redeclare': ['off', { ignoreDeclarationMerge: true }], // useful in FP.
|
|
58
58
|
'@typescript-eslint/no-require-imports': 'error',
|
|
59
59
|
'@typescript-eslint/no-restricted-imports': 'off',
|
|
60
|
-
'@typescript-eslint/consistent-type-imports': ['warn', { prefer: 'type-imports', disallowTypeAnnotations:
|
|
60
|
+
'@typescript-eslint/consistent-type-imports': ['warn', { prefer: 'type-imports', disallowTypeAnnotations: false }],
|
|
61
61
|
'@typescript-eslint/consistent-type-exports': 'warn',
|
|
62
62
|
'@typescript-eslint/no-shadow': 'error',
|
|
63
63
|
'@typescript-eslint/no-this-alias': 'error',
|
|
@@ -80,7 +80,7 @@ module.exports = {
|
|
|
80
80
|
'@typescript-eslint/no-useless-constructor': 'error',
|
|
81
81
|
'@typescript-eslint/no-var-requires': 'error',
|
|
82
82
|
'@typescript-eslint/object-curly-spacing': 'warn',
|
|
83
|
-
'@typescript-eslint/padding-line-between-statements': ['
|
|
83
|
+
'@typescript-eslint/padding-line-between-statements': ['warn', { blankLine: 'always', prev: ['return', 'export'], next: 'export' }],
|
|
84
84
|
'@typescript-eslint/prefer-as-const': 'warn',
|
|
85
85
|
'@typescript-eslint/prefer-enum-initializers': 'off',
|
|
86
86
|
'@typescript-eslint/prefer-for-of': 'warn',
|
|
@@ -148,5 +148,6 @@ module.exports = {
|
|
|
148
148
|
|
|
149
149
|
// open issues
|
|
150
150
|
'react/jsx-no-useless-fragment': 'off', // Need useless-fragment for JSX return type
|
|
151
|
+
'dot-notation': 'off', // Need to have IndexSignaturePropertyAccess Typescript compiler option
|
|
151
152
|
},
|
|
152
153
|
};
|