eslint-config-matsuri 1.7.1 → 2.1.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.
Files changed (3) hide show
  1. package/README.md +4 -1
  2. package/index.js +24 -5
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -24,8 +24,11 @@ yarn add eslint eslint-config-matsuri
24
24
  /** @type {import('eslint').Linter.BaseConfig} */
25
25
  const config = {
26
26
  extends: ["matsuri"],
27
+ parserOptions: {
28
+ project: true,
29
+ tsconfigRootDir: __dirname,
30
+ }
27
31
  };
28
-
29
32
  module.exports = config;
30
33
  ```
31
34
 
package/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  /** @type {import('eslint').Linter.BaseConfig} */
2
2
  const config = {
3
3
  reportUnusedDisableDirectives: true,
4
+ root: true,
4
5
  env: {
5
6
  commonjs: true,
6
7
  es2021: true,
@@ -34,19 +35,22 @@ const config = {
34
35
  browser: true,
35
36
  es2021: true,
36
37
  },
37
- plugins: ["css-reorder", "jsx-a11y", "unused-imports"],
38
+ plugins: [
39
+ "css-reorder",
40
+ "jsx-a11y",
41
+ "unused-imports",
42
+ "@typescript-eslint",
43
+ ],
38
44
  extends: [
39
45
  "plugin:react/recommended",
40
46
  "plugin:react-hooks/recommended",
41
47
  "plugin:react/jsx-runtime",
42
- "plugin:@typescript-eslint/recommended",
48
+ "plugin:@typescript-eslint/recommended-type-checked",
49
+ "plugin:@typescript-eslint/stylistic-type-checked",
43
50
  "plugin:jsx-a11y/recommended",
44
51
  "prettier",
45
52
  ],
46
53
  parser: "@typescript-eslint/parser",
47
- parserOptions: {
48
- project: "./tsconfig.json",
49
- },
50
54
  settings: {
51
55
  react: {
52
56
  version: "detect",
@@ -59,6 +63,8 @@ const config = {
59
63
 
60
64
  "@typescript-eslint/no-empty-interface": "off",
61
65
 
66
+ "@typescript-eslint/no-non-null-assertion": "error",
67
+
62
68
  "@typescript-eslint/consistent-type-exports": "error",
63
69
 
64
70
  "@typescript-eslint/strict-boolean-expressions": [
@@ -87,6 +93,19 @@ const config = {
87
93
  },
88
94
  ],
89
95
 
96
+ /**
97
+ * Allow `() => Promise<void>` in JSX event handler.
98
+ * @see https://github.com/typescript-eslint/typescript-eslint/blob/f373fac1dd0150273d98cee5bed606bbd3f55e4b/packages/eslint-plugin/docs/rules/no-misused-promises.md#checksvoidreturn
99
+ */
100
+ "@typescript-eslint/no-misused-promises": [
101
+ "error",
102
+ {
103
+ checksVoidReturn: {
104
+ attributes: false,
105
+ },
106
+ },
107
+ ],
108
+
90
109
  "react/self-closing-comp": [
91
110
  "error",
92
111
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-matsuri",
3
- "version": "1.7.1",
3
+ "version": "2.1.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -19,18 +19,18 @@
19
19
  },
20
20
  "devDependencies": {
21
21
  "@emotion/react": "11.11.1",
22
- "@types/react": "18.2.14",
23
- "eslint": "8.43.0",
22
+ "@types/react": "18.2.18",
23
+ "eslint": "8.46.0",
24
24
  "react": "18.2.0",
25
- "typescript": "5.1.3"
25
+ "typescript": "5.1.6"
26
26
  },
27
27
  "dependencies": {
28
- "@typescript-eslint/eslint-plugin": "5.60.1",
29
- "@typescript-eslint/parser": "5.60.1",
28
+ "@typescript-eslint/eslint-plugin": "6.2.1",
29
+ "@typescript-eslint/parser": "6.2.1",
30
30
  "eslint-config-prettier": "8.8.0",
31
31
  "eslint-plugin-css-reorder": "0.5.1",
32
32
  "eslint-plugin-jsx-a11y": "6.7.1",
33
- "eslint-plugin-react": "7.32.2",
33
+ "eslint-plugin-react": "7.33.1",
34
34
  "eslint-plugin-react-hooks": "4.6.0",
35
35
  "eslint-plugin-sort-imports-es6-autofix": "0.6.0",
36
36
  "eslint-plugin-unused-imports": "2.0.0"