@willbooster/eslint-config-ts-react 10.2.0 → 11.0.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
@@ -1,6 +1,6 @@
1
1
  # eslint-config-ts-react
2
2
 
3
- A ESLint config for TypeScript projects using React.
3
+ A ESLint flat config for TypeScript projects using React.
4
4
  You need to do the following command to install peer dependencies.
5
5
 
6
6
  ```sh
@@ -14,10 +14,8 @@ yarn add -D @willbooster/eslint-config-ts-react \
14
14
  eslint-plugin-sort-class-members \
15
15
  eslint-plugin-sort-destructure-keys \
16
16
  eslint-plugin-unicorn \
17
+ eslint-plugin-unused-imports \
17
18
  typescript \
18
- @typescript-eslint/eslint-plugin \
19
19
  @typescript-eslint/parser \
20
- eslint-import-resolver-typescript \
21
- prettier \
22
- @willbooster/prettier-config
20
+ eslint-import-resolver-typescript
23
21
  ```
@@ -0,0 +1,12 @@
1
+ import jsReactConfig from '@willbooster/eslint-config-js-react';
2
+ import tsConfig from '@willbooster/eslint-config-ts';
3
+
4
+ export default [
5
+ ...jsReactConfig,
6
+ ...tsConfig.map((config) => ({
7
+ ...config,
8
+ ...('files' in config
9
+ ? { files: config.files.map((file) => file.replace('{cts,mts,ts}', '{cts,mts,ts,tsx}')) }
10
+ : undefined),
11
+ })),
12
+ ];
package/package.json CHANGED
@@ -1,64 +1,72 @@
1
1
  {
2
2
  "name": "@willbooster/eslint-config-ts-react",
3
- "version": "10.2.0",
4
- "description": "A ESLint config for TypeScript projects using React",
3
+ "version": "11.0.0",
4
+ "description": "A ESLint flat config for TypeScript projects using React",
5
5
  "license": "Apache-2.0",
6
6
  "author": "WillBooster Inc.",
7
- "main": ".eslintrc.json",
7
+ "type": "module",
8
+ "main": "eslint.config.js",
8
9
  "files": [
9
- ".eslintrc.json"
10
+ "eslint.config.js"
10
11
  ],
11
12
  "scripts": {
12
13
  "cleanup": "yarn format && yarn lint-fix",
13
14
  "format": "sort-package-json && yarn prettify",
14
- "lint": "eslint --color \"./{scripts,src,tests}/**/*.{cjs,cts,js,jsx,mjs,mts,ts,tsx}\"",
15
+ "lint": "eslint --color",
15
16
  "lint-fix": "yarn lint --fix --rule \"{ react-hooks/exhaustive-deps: 0 }\"",
16
- "prettify": "prettier --cache --color --write \"**/{.*/,}*.{cjs,css,cts,htm,html,js,json,json5,jsx,md,mjs,mts,scss,ts,tsx,vue,yaml,yml}\" \"!**/test-fixtures/**\"",
17
+ "prettify": "prettier --cache --color --write \"**/{.*/,}*.{cjs,css,cts,htm,html,js,json,json5,jsonc,jsx,md,mjs,mts,scss,ts,tsx,vue,yaml,yml}\" \"!**/test-fixtures/**\"",
17
18
  "test": "yarn lint",
18
19
  "typecheck": "tsc --noEmit --Pretty"
19
20
  },
20
21
  "prettier": "@willbooster/prettier-config",
21
22
  "dependencies": {
22
- "@willbooster/eslint-config-ts": "10.6.0"
23
+ "@willbooster/eslint-config-js-react": "11.0.0",
24
+ "@willbooster/eslint-config-ts": "11.0.0"
23
25
  },
24
26
  "devDependencies": {
25
- "@types/eslint": "8.56.10",
26
- "@types/micromatch": "4.0.7",
27
- "@types/node": "20.12.7",
28
- "@types/react": "18.3.0",
29
- "@typescript-eslint/eslint-plugin": "7.7.1",
30
- "@typescript-eslint/parser": "7.7.1",
31
- "@willbooster/prettier-config": "9.1.2",
32
- "eslint": "8.57.0",
33
- "eslint-config-prettier": "9.1.0",
34
- "eslint-import-resolver-typescript": "3.6.1",
35
- "eslint-plugin-import": "2.29.1",
36
- "eslint-plugin-react": "7.34.1",
37
- "eslint-plugin-react-hooks": "4.6.1",
38
- "eslint-plugin-sort-class-members": "1.20.0",
27
+ "@eslint/js": "9.21.0",
28
+ "@types/eslint": "9.6.1",
29
+ "@types/micromatch": "4.0.9",
30
+ "@types/node": "22.13.9",
31
+ "@types/react": "19.0.10",
32
+ "@typescript-eslint/parser": "8.26.0",
33
+ "@willbooster/prettier-config": "10.0.0",
34
+ "eslint": "9.21.0",
35
+ "eslint-config-prettier": "10.0.2",
36
+ "eslint-import-resolver-typescript": "3.8.3",
37
+ "eslint-plugin-import-x": "4.6.1",
38
+ "eslint-plugin-react": "7.37.4",
39
+ "eslint-plugin-react-hooks": "5.2.0",
40
+ "eslint-plugin-sort-class-members": "1.21.0",
39
41
  "eslint-plugin-sort-destructure-keys": "2.0.0",
40
- "eslint-plugin-unicorn": "52.0.0",
41
- "lint-staged": "15.2.2",
42
- "micromatch": "4.0.5",
43
- "prettier": "3.2.5",
44
- "react": "18.3.0",
45
- "sort-package-json": "2.10.0",
46
- "typescript": "5.4.5",
47
- "use-immer": "0.9.0"
42
+ "eslint-plugin-unicorn": "57.0.0",
43
+ "eslint-plugin-unused-imports": "4.1.4",
44
+ "globals": "16.0.0",
45
+ "lint-staged": "15.4.3",
46
+ "micromatch": "4.0.8",
47
+ "prettier": "3.5.3",
48
+ "react": "19.0.0",
49
+ "sort-package-json": "3.0.0",
50
+ "typescript": "5.8.2",
51
+ "typescript-eslint": "8.26.0",
52
+ "use-immer": "0.11.0"
48
53
  },
49
54
  "peerDependencies": {
50
- "@typescript-eslint/eslint-plugin": ">=5",
51
- "@typescript-eslint/parser": ">=5",
52
- "@willbooster/prettier-config": "9.1.2",
53
- "eslint": ">=8",
54
- "eslint-config-prettier": ">=8",
55
- "eslint-import-resolver-typescript": ">=2",
56
- "eslint-plugin-import": ">=2",
55
+ "@eslint/js": ">=9",
56
+ "@typescript-eslint/parser": ">=8",
57
+ "eslint": ">=9",
58
+ "eslint-config-prettier": ">=10",
59
+ "eslint-import-resolver-typescript": ">=3",
60
+ "eslint-plugin-import-x": ">=4",
57
61
  "eslint-plugin-react": ">=7",
58
- "eslint-plugin-react-hooks": ">=4",
59
- "eslint-plugin-sort-class-members": ">=1.14",
60
- "eslint-plugin-sort-destructure-keys": ">=1.4",
61
- "typescript": ">=4"
62
+ "eslint-plugin-react-hooks": ">=5",
63
+ "eslint-plugin-sort-class-members": ">=1.21",
64
+ "eslint-plugin-sort-destructure-keys": ">=2",
65
+ "eslint-plugin-unicorn": ">=57",
66
+ "eslint-plugin-unused-imports": ">=4",
67
+ "globals": ">=16",
68
+ "typescript": ">=5",
69
+ "typescript-eslint": ">=8"
62
70
  },
63
71
  "publishConfig": {
64
72
  "access": "public"
package/.eslintrc.json DELETED
@@ -1,31 +0,0 @@
1
- {
2
- "extends": [
3
- "plugin:react/recommended",
4
- "plugin:react/jsx-runtime",
5
- "plugin:react-hooks/recommended",
6
- "@willbooster/eslint-config-ts"
7
- ],
8
- "rules": {
9
- "react/jsx-sort-props": [
10
- "error",
11
- {
12
- "callbacksLast": true,
13
- "shorthandFirst": true,
14
- "reservedFirst": true
15
- }
16
- ],
17
- "react/no-unknown-property": [
18
- "error",
19
- {
20
- "ignore": ["global", "jsx"]
21
- }
22
- ],
23
- "react/prop-types": "off"
24
- },
25
- "settings": {
26
- "import/core-modules": ["react-dom"],
27
- "react": {
28
- "version": "detect"
29
- }
30
- }
31
- }