@foray1010/eslint-config 6.1.1 → 6.2.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/CHANGELOG.md CHANGED
@@ -3,6 +3,29 @@
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.2.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@6.1.3...@foray1010/eslint-config@6.2.0) (2022-04-05)
7
+
8
+ ### Features
9
+
10
+ - enable testing-library/prefer-user-event ([5a1de13](https://github.com/foray1010/common-presets/commit/5a1de1348fbc591a35559d5710185487d6b31a87))
11
+
12
+ ### Bug Fixes
13
+
14
+ - disable no-await-sync-events for @testing-library/user-event v14 ([372a3b5](https://github.com/foray1010/common-presets/commit/372a3b597f5cca2f53bbc895cd0e3da3c051263a))
15
+
16
+ ### [6.1.3](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@6.1.2...@foray1010/eslint-config@6.1.3) (2022-03-20)
17
+
18
+ ### Bug Fixes
19
+
20
+ - **deps:** update dependency eslint-plugin-jsdoc to v38 ([294bd8b](https://github.com/foray1010/common-presets/commit/294bd8b03ee7c94e6e2fe6aad4a60c4d3654c7ca))
21
+
22
+ ### [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)
23
+
24
+ ### Bug Fixes
25
+
26
+ - allow using async function as event handler in frontend ([6722b08](https://github.com/foray1010/common-presets/commit/6722b08a659e82bfdc8cba8fc1d0c9cd1d396d03))
27
+ - **deps:** update dependency eslint-plugin-jest to v26 ([cee6be9](https://github.com/foray1010/common-presets/commit/cee6be913cee626709053989f2545780e0d46bb0))
28
+
6
29
  ### [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
30
 
8
31
  ### 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.1.1",
4
+ "version": "6.2.0",
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,16 +21,16 @@
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
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",
31
+ "eslint-plugin-jest": "^26.0.0",
32
32
  "eslint-plugin-jest-dom": "^4.0.0",
33
- "eslint-plugin-jsdoc": "^37.0.0",
33
+ "eslint-plugin-jsdoc": "^38.0.0",
34
34
  "eslint-plugin-node": "^11.1.0",
35
35
  "eslint-plugin-prettier": "^4.0.0",
36
36
  "eslint-plugin-react": "^7.23.2",
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "caaca02524ad9574dcddf9ef851051599e999703"
51
+ "gitHead": "4ef900b508bad3ab5f5c29a904ddd9021af43310"
52
52
  }
package/presets/base.js CHANGED
@@ -167,6 +167,11 @@ 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
+ ],
170
175
  // many false alarms
171
176
  '@typescript-eslint/no-unsafe-argument': 'off',
172
177
  // some third party packages doesn't offer typings
package/presets/react.js CHANGED
@@ -51,7 +51,6 @@ module.exports = {
51
51
  plugins: ['eslint-plugin-jest-dom', 'eslint-plugin-testing-library'],
52
52
  rules: {
53
53
  // avoid using unnecessary `await` as workaround for `not wrapped in act(...)` warnings
54
- 'testing-library/no-await-sync-events': 'error',
55
54
  'testing-library/no-wait-for-empty-callback': 'error',
56
55
  // avoid side effects inside `waitFor`
57
56
  'testing-library/no-wait-for-snapshot': 'error',
@@ -61,6 +60,8 @@ module.exports = {
61
60
  'testing-library/prefer-presence-queries': 'error',
62
61
  // using `screen` to avoid name collision
63
62
  'testing-library/prefer-screen-queries': 'error',
63
+ // prefer @testing-library/user-event over fireEvent
64
+ 'testing-library/prefer-user-event': 'error',
64
65
  // as `wait` is deprecated
65
66
  'testing-library/prefer-wait-for': 'error',
66
67
  },