@resolid/config 3.1.2 → 3.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/README.md CHANGED
@@ -34,14 +34,14 @@ pnpm add -D @resolid/config eslint prettier
34
34
 
35
35
  语言选项默认为 `ecmaVersion: 2022`, `sourceType: 'module'`
36
36
 
37
- ### 基本 Lint 配置
37
+ ### Javascript Lint 配置
38
38
 
39
39
  ```js
40
40
  // eslint.config.js
41
- import eslintBase from "@resolid/config/eslint.base";
41
+ import eslintJavascript from "@resolid/config/eslint.javascript";
42
42
 
43
43
  /** @type {import('eslint').Linter.FlatConfig[]} */
44
- export default [...eslintBase];
44
+ export default [...eslintJavascript];
45
45
  ```
46
46
 
47
47
  ### TypeScript Lint 配置
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolid/config",
3
- "version": "3.1.2",
3
+ "version": "3.2.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "Eslint and Prettier config",
@@ -25,30 +25,30 @@
25
25
  "./tsconfig/*": "./tsconfig/*.json"
26
26
  },
27
27
  "dependencies": {
28
- "@eslint/js": "^9.18.0",
28
+ "@eslint/js": "^9.19.0",
29
29
  "eslint-plugin-jsx-a11y": "^6.10.2",
30
30
  "eslint-plugin-n": "^17.15.1",
31
- "eslint-plugin-react": "^7.37.3",
31
+ "eslint-plugin-react": "^7.37.4",
32
32
  "eslint-plugin-react-compiler": "beta",
33
33
  "eslint-plugin-react-hooks": "^5.1.0",
34
34
  "eslint-plugin-react-refresh": "^0.4.18",
35
35
  "globals": "^15.14.0",
36
36
  "prettier-plugin-organize-imports": "^4.1.0",
37
- "typescript-eslint": "^8.19.1"
37
+ "typescript-eslint": "^8.22.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@arethetypeswrong/cli": "^0.17.2",
40
+ "@arethetypeswrong/cli": "^0.17.3",
41
41
  "@changesets/changelog-github": "^0.5.0",
42
- "@changesets/cli": "^2.27.11",
42
+ "@changesets/cli": "^2.27.12",
43
43
  "@commitlint/cli": "^19.6.1",
44
44
  "@commitlint/config-conventional": "^19.6.0",
45
- "eslint": "^9.18.0",
46
- "lefthook": "^1.10.3",
45
+ "eslint": "^9.19.0",
46
+ "lefthook": "^1.10.10",
47
47
  "prettier": "^3.4.2",
48
48
  "typescript": "^5.7.3"
49
49
  },
50
50
  "peerDependencies": {
51
- "eslint": "^9.18.0",
51
+ "eslint": "^9.19.0",
52
52
  "prettier": "^3.4.2",
53
53
  "typescript": "^5.7.3"
54
54
  },
@@ -3,14 +3,12 @@ import react from "eslint-plugin-react";
3
3
  import reactCompiler from "eslint-plugin-react-compiler";
4
4
  import reactHooks from "eslint-plugin-react-hooks";
5
5
  import reactRefresh from "eslint-plugin-react-refresh";
6
- import eslintTypescript from "./eslint.typescript.js";
7
6
 
8
7
  // noinspection JSUnusedGlobalSymbols,JSUnresolvedReference
9
8
  /** @type {import('eslint').Linter.FlatConfig[]} */
10
9
  export default [
11
- ...eslintTypescript,
12
10
  {
13
- files: ["**/*.{jsx,tsx}"],
11
+ files: ["**/*.jsx", "**/*.tsx"],
14
12
  plugins: {
15
13
  react: react,
16
14
  "react-refresh": reactRefresh,
@@ -27,13 +25,13 @@ export default [
27
25
  "clientAction",
28
26
  "clientLoader",
29
27
  "ErrorBoundary",
30
- "handle",
31
28
  "HydrateFallback",
32
29
  "Layout",
30
+ "action",
31
+ "loader",
32
+ "handle",
33
33
  "links",
34
34
  "meta",
35
- "loader",
36
- "action",
37
35
  "shouldRevalidate",
38
36
  ],
39
37
  },
@@ -55,7 +53,7 @@ export default [
55
53
  },
56
54
  },
57
55
  {
58
- files: ["**/*.{js,jsx,ts,tsx}"],
56
+ files: ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
59
57
  plugins: {
60
58
  "react-hooks": reactHooks,
61
59
  "react-compiler": reactCompiler,
@@ -72,7 +70,7 @@ export default [
72
70
  },
73
71
  },
74
72
  {
75
- files: ["**/*.{jsx,tsx}"],
73
+ files: ["**/*.jsx", "**/*.tsx"],
76
74
  ...jsxA11y.flatConfigs.recommended,
77
75
  },
78
76
  ];
@@ -1,8 +1,16 @@
1
1
  import typescript from "typescript-eslint";
2
- import eslintBase from "./eslint.base.js";
2
+ import javascript from "./eslint.javascript.js";
3
3
 
4
4
  /** @type {import('eslint').Linter.FlatConfig[]} */
5
- export default typescript.config(...eslintBase, ...typescript.configs.recommended, {
5
+ export default typescript.config({
6
+ files: ["**/*.ts", "**/*.tsx"],
7
+ extends: [javascript, typescript.configs.recommended],
8
+ languageOptions: {
9
+ parser: typescript.parser,
10
+ parserOptions: {
11
+ projectService: true,
12
+ },
13
+ },
6
14
  rules: {
7
15
  "@typescript-eslint/no-import-type-side-effects": "error",
8
16
  "@typescript-eslint/method-signature-style": ["error", "property"],
File without changes