@foray1010/eslint-config 5.0.4 → 6.1.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/CHANGELOG.md +47 -0
- package/README.md +1 -1
- package/package.json +13 -13
- package/presets/base.js +4 -10
- package/presets/react.js +2 -0
- package/presets/utils/testUtil.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,53 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
### [6.1.1](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@6.1.0...@foray1010/eslint-config@6.1.1) (2022-01-09)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **deps:** update dependency eslint-plugin-compat to v4 ([4b6ee6b](https://github.com/foray1010/common-presets/commit/4b6ee6bc480cf396d047170fc75e53d01ea5886f))
|
|
11
|
+
- **deps:** update dependency eslint-plugin-jest-dom to v4 ([2396973](https://github.com/foray1010/common-presets/commit/23969736c9e263f923521115b8104275a755a082))
|
|
12
|
+
|
|
13
|
+
## [6.1.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@6.0.1...@foray1010/eslint-config@6.1.0) (2021-11-10)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- use error level for @typescript-eslint/no-unused-vars ([c635963](https://github.com/foray1010/common-presets/commit/c635963db88a75d8a0c61fda55f8e4c61b33766f))
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
- disable @typescript-eslint/no-unsafe-argument ([ecad97d](https://github.com/foray1010/common-presets/commit/ecad97d960ab4545f981e79b7c24589ff150f7e1))
|
|
22
|
+
- disable buggy react/prop-types ([bec417b](https://github.com/foray1010/common-presets/commit/bec417b909c9abf9b54dcff298c250f1430d318e))
|
|
23
|
+
|
|
24
|
+
### [6.0.1](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@6.0.0...@foray1010/eslint-config@6.0.1) (2021-11-10)
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
- replace @typescript-eslint/no-unused-vars-experimental by @typescript-eslint/no-unused-vars ([cdff12f](https://github.com/foray1010/common-presets/commit/cdff12fe2f503187a0e8b03588bdc79279fbfea2))
|
|
29
|
+
|
|
30
|
+
## [6.0.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@5.0.4...@foray1010/eslint-config@6.0.0) (2021-11-10)
|
|
31
|
+
|
|
32
|
+
### ⚠ BREAKING CHANGES
|
|
33
|
+
|
|
34
|
+
- only support node ^12.22.0 || ^14.17.0 || >=16.13.0
|
|
35
|
+
- **deps:** require eslint >=7.28.0
|
|
36
|
+
|
|
37
|
+
### Features
|
|
38
|
+
|
|
39
|
+
- support .cts and .mts ([bac92f3](https://github.com/foray1010/common-presets/commit/bac92f3d9315af4b8a51848a0cb5c3061ef49f20))
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
- **deps:** update dependency eslint-plugin-jest to v25 ([8fb9f81](https://github.com/foray1010/common-presets/commit/8fb9f818e19cf8c3c7efa5c862adcb22c433c5e4))
|
|
44
|
+
- **deps:** update dependency eslint-plugin-jsdoc to v37 ([bcd1cef](https://github.com/foray1010/common-presets/commit/bcd1cefb4b918cf70724c9849ac20746f0f15fa1))
|
|
45
|
+
- **deps:** update dependency eslint-plugin-prettier to v4 ([aa2e33e](https://github.com/foray1010/common-presets/commit/aa2e33e7406739ddde0141a4ad9c77685e4b7d31))
|
|
46
|
+
- **deps:** update dependency eslint-plugin-testing-library to v5 ([19f7db5](https://github.com/foray1010/common-presets/commit/19f7db54f1c4c5993d0b5f885ced436c06a4e3dd))
|
|
47
|
+
- **deps:** update typescript-eslint monorepo to v5 ([36d4840](https://github.com/foray1010/common-presets/commit/36d4840c107d483780ee6cf0e227be73d82bb918))
|
|
48
|
+
|
|
49
|
+
### Miscellaneous Chores
|
|
50
|
+
|
|
51
|
+
- bump node version requirement ([6906953](https://github.com/foray1010/common-presets/commit/6906953ac0b781376d5c8a17d27faef6a457278a))
|
|
52
|
+
|
|
6
53
|
### [5.0.4](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@5.0.3...@foray1010/eslint-config@5.0.4) (2021-08-26)
|
|
7
54
|
|
|
8
55
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ Z for looser rules
|
|
|
37
37
|
```json
|
|
38
38
|
{
|
|
39
39
|
"scripts": {
|
|
40
|
-
"eslint": "eslint --ext=cjs,js,mjs,ts,tsx --ignore-path=node_modules/@foray1010/eslint-config/eslintignore"
|
|
40
|
+
"eslint": "eslint --ext=cjs,cts,js,mjs,mts,ts,tsx --ignore-path=node_modules/@foray1010/eslint-config/eslintignore"
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@foray1010/eslint-config",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "6.1.1",
|
|
5
5
|
"homepage": "https://github.com/foray1010/common-presets/tree/master/packages/eslint-config#readme",
|
|
6
6
|
"bugs": "https://github.com/foray1010/common-presets/issues",
|
|
7
7
|
"repository": {
|
|
@@ -20,33 +20,33 @@
|
|
|
20
20
|
"eslintignore"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@foray1010/common-presets-utils": "^
|
|
24
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
25
|
-
"@typescript-eslint/parser": "^
|
|
23
|
+
"@foray1010/common-presets-utils": "^4.0.0",
|
|
24
|
+
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
|
25
|
+
"@typescript-eslint/parser": "^5.0.0",
|
|
26
26
|
"confusing-browser-globals": "^1.0.10",
|
|
27
27
|
"eslint-config-prettier": "^8.3.0",
|
|
28
|
-
"eslint-plugin-compat": "^
|
|
28
|
+
"eslint-plugin-compat": "^4.0.0",
|
|
29
29
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
30
30
|
"eslint-plugin-import": "^2.22.1",
|
|
31
|
-
"eslint-plugin-jest": "^
|
|
32
|
-
"eslint-plugin-jest-dom": "^
|
|
33
|
-
"eslint-plugin-jsdoc": "^
|
|
31
|
+
"eslint-plugin-jest": "^25.0.0",
|
|
32
|
+
"eslint-plugin-jest-dom": "^4.0.0",
|
|
33
|
+
"eslint-plugin-jsdoc": "^37.0.0",
|
|
34
34
|
"eslint-plugin-node": "^11.1.0",
|
|
35
|
-
"eslint-plugin-prettier": "^
|
|
35
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
36
36
|
"eslint-plugin-react": "^7.23.2",
|
|
37
37
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
38
38
|
"eslint-plugin-simple-import-sort": "^7.0.0",
|
|
39
|
-
"eslint-plugin-testing-library": "^
|
|
39
|
+
"eslint-plugin-testing-library": "^5.0.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"eslint": ">=7.
|
|
42
|
+
"eslint": ">=7.28.0 <9",
|
|
43
43
|
"prettier": ">=2 <3"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
|
-
"node": "
|
|
46
|
+
"node": "^12.22.0 || ^14.17.0 || >=16.13.0"
|
|
47
47
|
},
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "caaca02524ad9574dcddf9ef851051599e999703"
|
|
52
52
|
}
|
package/presets/base.js
CHANGED
|
@@ -131,7 +131,7 @@ module.exports = {
|
|
|
131
131
|
...(hasDep('typescript')
|
|
132
132
|
? [
|
|
133
133
|
{
|
|
134
|
-
files: ['*.{ts,tsx}'],
|
|
134
|
+
files: ['*.{cts,mts,ts,tsx}'],
|
|
135
135
|
extends: [
|
|
136
136
|
'plugin:@typescript-eslint/recommended',
|
|
137
137
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
@@ -167,6 +167,8 @@ module.exports = {
|
|
|
167
167
|
'@typescript-eslint/no-implicit-any-catch': 'error',
|
|
168
168
|
// enforce correct usage of `void` type
|
|
169
169
|
'@typescript-eslint/no-invalid-void-type': 'error',
|
|
170
|
+
// many false alarms
|
|
171
|
+
'@typescript-eslint/no-unsafe-argument': 'off',
|
|
170
172
|
// some third party packages doesn't offer typings
|
|
171
173
|
'@typescript-eslint/no-unsafe-assignment': 'off',
|
|
172
174
|
// some third party packages doesn't offer typings
|
|
@@ -175,16 +177,8 @@ module.exports = {
|
|
|
175
177
|
'@typescript-eslint/no-unsafe-member-access': 'off',
|
|
176
178
|
// some third party packages doesn't offer typings
|
|
177
179
|
'@typescript-eslint/no-unsafe-return': 'off',
|
|
178
|
-
// use @typescript-eslint/no-unused-vars-experimental as this rule doesn't support types
|
|
179
|
-
'@typescript-eslint/no-unused-vars': 'off',
|
|
180
180
|
// must remove unused variables and types
|
|
181
|
-
'@typescript-eslint/no-unused-vars
|
|
182
|
-
'error',
|
|
183
|
-
{
|
|
184
|
-
ignoreArgsIfArgsAfterAreUsed: true,
|
|
185
|
-
ignoredNamesRegex: false,
|
|
186
|
-
},
|
|
187
|
-
],
|
|
181
|
+
'@typescript-eslint/no-unused-vars': 'error',
|
|
188
182
|
// do not block functions referring to other functions
|
|
189
183
|
'@typescript-eslint/no-use-before-define': [
|
|
190
184
|
'error',
|
package/presets/react.js
CHANGED
|
@@ -30,6 +30,8 @@ module.exports = {
|
|
|
30
30
|
shorthandLast: false,
|
|
31
31
|
},
|
|
32
32
|
],
|
|
33
|
+
// rely on typescript instead, and it does not work well with types that are imported from elsewhere
|
|
34
|
+
'react/prop-types': 'off',
|
|
33
35
|
// because we are using automatic react runtime
|
|
34
36
|
'react/react-in-jsx-scope': 'off',
|
|
35
37
|
'react-hooks/rules-of-hooks': 'error',
|