eslint-config-matsuri 4.4.0 → 5.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.
package/README.md CHANGED
@@ -25,7 +25,7 @@ Flat configをv3からサポートしています。eslint.config.jsに次のよ
25
25
  ```js
26
26
  import config from "eslint-config-matsuri";
27
27
 
28
- /** @type { import("eslint").Linter.FlatConfig[] } */
28
+ /** @type { import("eslint").Linter.Config[] } */
29
29
  export default config
30
30
  ```
31
31
 
@@ -34,7 +34,7 @@ export default config
34
34
  ```js
35
35
  import { configs } from "eslint-config-matsuri";
36
36
 
37
- /** @type { import("eslint").Linter.FlatConfig[] } */
37
+ /** @type { import("eslint").Linter.Config[] } */
38
38
  export default [
39
39
  configs.base,
40
40
  {
@@ -70,14 +70,6 @@ export default [
70
70
  ]
71
71
  ```
72
72
 
73
- VSCodeでFlag configを利用する場合は、`.vscode/settings.json`に次の設定を追加する必要があります。
74
-
75
- ```json
76
- {
77
- "eslint.experimental.useFlatConfig": true
78
- }
79
- ```
80
-
81
73
 
82
74
  ## Contributing
83
75
 
package/configs/base.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @type {import("eslint").Linter.FlatConfig } */
1
+ /** @type {import("eslint").Linter.Config } */
2
2
  export const baseConfig = {
3
3
  ignores: [
4
4
  "**/node_modules/**",
@@ -4,7 +4,7 @@ import pluginPrettier from "eslint-config-prettier";
4
4
  import pluginSortImports from "eslint-plugin-sort-imports-es6-autofix";
5
5
  import pluginUnusedImport from "eslint-plugin-unused-imports";
6
6
 
7
- /** @type {import("eslint").Linter.FlatConfig } */
7
+ /** @type {import("eslint").Linter.Config } */
8
8
  export const jsConfig = {
9
9
  linterOptions: {
10
10
  reportUnusedDisableDirectives: true,
package/configs/react.js CHANGED
@@ -4,7 +4,7 @@ import pluginJsxA11y from "eslint-plugin-jsx-a11y";
4
4
  import pluginReact from "eslint-plugin-react";
5
5
  import pluginReactHooks from "eslint-plugin-react-hooks";
6
6
 
7
- /** @type {import("eslint").Linter.FlatConfig } */
7
+ /** @type {import("eslint").Linter.Config } */
8
8
  export const reactConfig = {
9
9
  files: ["**/*.tsx"],
10
10
  languageOptions: {
package/configs/test.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import globals from "globals";
2
2
 
3
- /** @type {import("eslint").Linter.FlatConfig } */
3
+ /** @type {import("eslint").Linter.Config } */
4
4
  export const testConfig = {
5
5
  files: ["**/*.test.ts", "**/*.test.tsx", "**/*.test.js", "**/*.test.jsx"],
6
6
  languageOptions: {
@@ -19,7 +19,7 @@ const tseslintStylisticTypeCheckedRules = getRulesFromConfigArray(
19
19
  tseslint.configs.stylisticTypeChecked
20
20
  );
21
21
 
22
- /** @type {import("eslint").Linter.FlatConfig } */
22
+ /** @type {import("eslint").Linter.Config } */
23
23
  export const tsConfig = {
24
24
  files: ["**/*.ts", "**/*.tsx"],
25
25
  plugins: {
@@ -37,8 +37,6 @@ export const tsConfig = {
37
37
  "@typescript-eslint/no-unused-vars": "off",
38
38
  "@typescript-eslint/explicit-module-boundary-types": "off",
39
39
 
40
- "@typescript-eslint/no-empty-interface": "off",
41
-
42
40
  "@typescript-eslint/no-non-null-assertion": "error",
43
41
 
44
42
  "@typescript-eslint/consistent-type-exports": "error",
@@ -47,13 +45,16 @@ export const tsConfig = {
47
45
  "error",
48
46
  {
49
47
  allowString: true,
48
+ allowNumber: true,
50
49
  allowNullableObject: true,
51
- allowNullableBoolean: true,
52
- allowNullableString: true,
50
+ allowNullableBoolean: false,
51
+ allowNullableString: false,
52
+ allowNullableNumber: false,
53
+ allowNullableEnum: false,
53
54
  allowAny: true,
54
55
  },
55
56
  ],
56
- "@typescript-eslint/ban-types": [
57
+ "@typescript-eslint/no-restricted-types": [
57
58
  "error",
58
59
  {
59
60
  types: {
@@ -76,7 +77,6 @@ export const tsConfig = {
76
77
  },
77
78
  },
78
79
  ],
79
-
80
80
  /**
81
81
  * Allow `() => Promise<void>` in JSX event handler.
82
82
  * @see https://github.com/typescript-eslint/typescript-eslint/blob/f373fac1dd0150273d98cee5bed606bbd3f55e4b/packages/eslint-plugin/docs/rules/no-misused-promises.md#checksvoidreturn
@@ -89,5 +89,13 @@ export const tsConfig = {
89
89
  },
90
90
  },
91
91
  ],
92
+ /**
93
+ * This rule is included in recommended.
94
+ */
95
+ "@typescript-eslint/no-empty-object-type": [
96
+ "error",
97
+ // Allow extended interfaces
98
+ { allowInterfaces: "with-single-extends" },
99
+ ],
92
100
  },
93
101
  };
package/index.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { Linter } from "eslint";
2
2
 
3
3
  export declare const configs: {
4
- base: Linter.FlatConfig;
5
- javascript: Linter.FlatConfig;
6
- typescript: Linter.FlatConfig;
7
- react: Linter.FlatConfig;
8
- test: Linter.FlatConfig;
4
+ base: Linter.Config;
5
+ javascript: Linter.Config;
6
+ typescript: Linter.Config;
7
+ react: Linter.Config;
8
+ test: Linter.Config;
9
9
  };
10
10
 
11
- declare const config: Linter.FlatConfig[];
11
+ declare const config: Linter.Config[];
12
12
 
13
13
  export default config;
package/index.js CHANGED
@@ -12,7 +12,7 @@ export const configs = {
12
12
  test: testConfig,
13
13
  };
14
14
 
15
- /** @type { import("eslint").Linter.FlatConfig[] } */
15
+ /** @type { import("eslint").Linter.Config[] } */
16
16
  const config = [baseConfig, jsConfig, tsConfig, reactConfig, testConfig];
17
17
 
18
18
  export default config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-matsuri",
3
- "version": "4.4.0",
3
+ "version": "5.1.0",
4
4
  "type": "module",
5
5
  "description": "",
6
6
  "main": "index.js",
@@ -14,7 +14,9 @@
14
14
  "configs"
15
15
  ],
16
16
  "scripts": {
17
- "test": "eslint . --max-warnings 0"
17
+ "test": "eslint . --max-warnings 0",
18
+ "inspect": "npx @eslint/config-inspector",
19
+ "build-inspect": "npx @eslint/config-inspector build --base /eslint-config-matsuri/"
18
20
  },
19
21
  "keywords": [],
20
22
  "author": "hrdtbs",
@@ -22,18 +24,18 @@
22
24
  "registry": "https://registry.npmjs.org/"
23
25
  },
24
26
  "peerDependencies": {
25
- "eslint": "^8.43.0"
27
+ "eslint": "^8.43.0 || ^9.0.0"
26
28
  },
27
29
  "dependencies": {
28
- "@eslint/js": "9.2.0",
30
+ "@eslint/js": "9.9.1",
29
31
  "eslint-config-prettier": "9.1.0",
30
32
  "eslint-plugin-css-reorder": "0.5.1",
31
- "eslint-plugin-jsx-a11y": "6.8.0",
32
- "eslint-plugin-react": "7.34.1",
33
+ "eslint-plugin-jsx-a11y": "6.9.0",
34
+ "eslint-plugin-react": "7.35.0",
33
35
  "eslint-plugin-react-hooks": "4.6.2",
34
36
  "eslint-plugin-sort-imports-es6-autofix": "0.6.0",
35
- "eslint-plugin-unused-imports": "3.2.0",
36
- "globals": "15.2.0",
37
- "typescript-eslint": "7.8.0"
37
+ "eslint-plugin-unused-imports": "4.1.3",
38
+ "globals": "15.9.0",
39
+ "typescript-eslint": "8.2.0"
38
40
  }
39
41
  }