@resolid/config 1.0.2 → 1.0.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resolid/config",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "Resolid 通用配置",
@@ -28,19 +28,20 @@
28
28
  "dependencies": {
29
29
  "@eslint/js": "^8.57.0",
30
30
  "eslint-plugin-jsx-a11y": "^6.8.0",
31
- "eslint-plugin-n": "^16.6.2",
31
+ "eslint-plugin-n": "^17.2.0",
32
32
  "eslint-plugin-react": "^7.34.1",
33
33
  "eslint-plugin-react-hooks": "^4.6.0",
34
- "globals": "^14.0.0",
35
- "typescript-eslint": "^7.2.0"
34
+ "eslint-plugin-react-refresh": "^0.4.6",
35
+ "globals": "^15.0.0",
36
+ "typescript-eslint": "^7.6.0"
36
37
  },
37
38
  "devDependencies": {
38
39
  "eslint": "^8.57.0",
39
- "typescript": "^5.4.2"
40
+ "typescript": "^5.4.5"
40
41
  },
41
42
  "peerDependencies": {
42
43
  "eslint": "^8.57.0",
43
- "typescript": "^5.4.2"
44
+ "typescript": "^5.4.5"
44
45
  },
45
46
  "peerDependenciesMeta": {
46
47
  "typescript": {
@@ -50,7 +51,7 @@
50
51
  "homepage": "https://resolid.tech",
51
52
  "repository": {
52
53
  "type": "git",
53
- "url": "git+https://github.com/huijiewei/resolid-config.git"
54
+ "url": "https://github.com/huijiewei/resolid-config.git"
54
55
  },
55
56
  "scripts": {
56
57
  "lint": "eslint ."
@@ -1,6 +1,7 @@
1
1
  import jsxA11y from "eslint-plugin-jsx-a11y";
2
2
  import react from "eslint-plugin-react";
3
3
  import reactHooks from "eslint-plugin-react-hooks";
4
+ import reactRefresh from "eslint-plugin-react-refresh";
4
5
  import eslintTypescript from "./eslint.typescript.js";
5
6
 
6
7
  /** @type {import('eslint').Linter.FlatConfig[]} */
@@ -10,11 +11,19 @@ export default [
10
11
  files: ["**/*.{jsx,tsx}"],
11
12
  plugins: {
12
13
  react: react,
14
+ "react-refresh": reactRefresh,
13
15
  },
14
16
  rules: {
15
17
  ...react.configs.recommended.rules,
16
18
  ...react.configs["jsx-runtime"].rules,
17
19
  "react/prop-types": "off",
20
+ "react-refresh/only-export-components": [
21
+ "warn",
22
+ {
23
+ allowConstantExport: true,
24
+ allowExportNames: ["meta", "links", "loader", "action", "Layout", "HydrateFallback", "ErrorBoundary"],
25
+ },
26
+ ],
18
27
  },
19
28
  languageOptions: {
20
29
  parserOptions: {
@@ -1,32 +1,25 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
3
  "compilerOptions": {
4
- // Type Checking
5
- "strict": true,
6
- "noFallthroughCasesInSwitch": true,
7
-
8
- // Modules
9
- "module": "ES2022",
10
- "moduleResolution": "Bundler",
4
+ /* Base Options: */
5
+ "esModuleInterop": true,
6
+ "skipLibCheck": true,
7
+ "target": "es2022",
8
+ "allowJs": true,
11
9
  "resolveJsonModule": true,
12
10
  "moduleDetection": "force",
11
+ "isolatedModules": true,
13
12
 
14
- // Emit
13
+ /* Strictness */
14
+ "strict": true,
15
+ "noFallthroughCasesInSwitch": true,
16
+
17
+ /* If NOT transpiling with TypeScript: */
18
+ "module": "preserve",
15
19
  "noEmit": true,
16
20
  "verbatimModuleSyntax": true,
17
21
 
18
- // JavaScript Support
19
- "allowJs": true,
20
-
21
- // Interop Constraints
22
- "esModuleInterop": true,
23
- "forceConsistentCasingInFileNames": true,
24
-
25
- // Language and Environment
26
- "lib": ["DOM", "DOM.Iterable", "ES2022"],
27
- "target": "ES2022",
28
-
29
- // Completeness
30
- "skipLibCheck": true
22
+ /* If your code runs in the DOM: */
23
+ "lib": ["es2022", "dom", "dom.iterable"]
31
24
  }
32
25
  }