@foray1010/eslint-config 6.0.1 → 6.1.2

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 CHANGED
@@ -3,6 +3,31 @@
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.2](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@6.1.1...@foray1010/eslint-config@6.1.2) (2022-03-07)
7
+
8
+ ### Bug Fixes
9
+
10
+ - allow using async function as event handler in frontend ([6722b08](https://github.com/foray1010/common-presets/commit/6722b08a659e82bfdc8cba8fc1d0c9cd1d396d03))
11
+ - **deps:** update dependency eslint-plugin-jest to v26 ([cee6be9](https://github.com/foray1010/common-presets/commit/cee6be913cee626709053989f2545780e0d46bb0))
12
+
13
+ ### [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)
14
+
15
+ ### Bug Fixes
16
+
17
+ - **deps:** update dependency eslint-plugin-compat to v4 ([4b6ee6b](https://github.com/foray1010/common-presets/commit/4b6ee6bc480cf396d047170fc75e53d01ea5886f))
18
+ - **deps:** update dependency eslint-plugin-jest-dom to v4 ([2396973](https://github.com/foray1010/common-presets/commit/23969736c9e263f923521115b8104275a755a082))
19
+
20
+ ## [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)
21
+
22
+ ### Features
23
+
24
+ - use error level for @typescript-eslint/no-unused-vars ([c635963](https://github.com/foray1010/common-presets/commit/c635963db88a75d8a0c61fda55f8e4c61b33766f))
25
+
26
+ ### Bug Fixes
27
+
28
+ - disable @typescript-eslint/no-unsafe-argument ([ecad97d](https://github.com/foray1010/common-presets/commit/ecad97d960ab4545f981e79b7c24589ff150f7e1))
29
+ - disable buggy react/prop-types ([bec417b](https://github.com/foray1010/common-presets/commit/bec417b909c9abf9b54dcff298c250f1430d318e))
30
+
6
31
  ### [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)
7
32
 
8
33
  ### Bug Fixes
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": "6.0.1",
4
+ "version": "6.1.2",
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": {
@@ -21,15 +21,15 @@
21
21
  ],
22
22
  "dependencies": {
23
23
  "@foray1010/common-presets-utils": "^4.0.0",
24
- "@typescript-eslint/eslint-plugin": "^5.0.0",
25
- "@typescript-eslint/parser": "^5.0.0",
24
+ "@typescript-eslint/eslint-plugin": "^5.13.0",
25
+ "@typescript-eslint/parser": "^5.13.0",
26
26
  "confusing-browser-globals": "^1.0.10",
27
27
  "eslint-config-prettier": "^8.3.0",
28
- "eslint-plugin-compat": "^3.9.0",
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": "^25.0.0",
32
- "eslint-plugin-jest-dom": "^3.8.1",
31
+ "eslint-plugin-jest": "^26.0.0",
32
+ "eslint-plugin-jest-dom": "^4.0.0",
33
33
  "eslint-plugin-jsdoc": "^37.0.0",
34
34
  "eslint-plugin-node": "^11.1.0",
35
35
  "eslint-plugin-prettier": "^4.0.0",
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "3569b36c51be4cca0f8f88285c495de867440298"
51
+ "gitHead": "c249d34848537c4a5048e76f306dbe4b1fa28e7f"
52
52
  }
package/presets/base.js CHANGED
@@ -167,6 +167,13 @@ 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
+ // allow using async function as event handler in frontend
171
+ '@typescript-eslint/no-misused-promises': [
172
+ 'error',
173
+ { checksVoidReturn: false },
174
+ ],
175
+ // many false alarms
176
+ '@typescript-eslint/no-unsafe-argument': 'off',
170
177
  // some third party packages doesn't offer typings
171
178
  '@typescript-eslint/no-unsafe-assignment': 'off',
172
179
  // some third party packages doesn't offer typings
@@ -175,6 +182,8 @@ module.exports = {
175
182
  '@typescript-eslint/no-unsafe-member-access': 'off',
176
183
  // some third party packages doesn't offer typings
177
184
  '@typescript-eslint/no-unsafe-return': 'off',
185
+ // must remove unused variables and types
186
+ '@typescript-eslint/no-unused-vars': 'error',
178
187
  // do not block functions referring to other functions
179
188
  '@typescript-eslint/no-use-before-define': [
180
189
  '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',