@rpcbase/eslint-config 0.10.0 → 0.12.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 (2) hide show
  1. package/eslint.config.js +16 -9
  2. package/package.json +2 -1
package/eslint.config.js CHANGED
@@ -4,6 +4,8 @@ import pluginImport from "eslint-plugin-import"
4
4
  import pluginJs from "@eslint/js"
5
5
  import pluginReact from "eslint-plugin-react"
6
6
  import tseslint from "typescript-eslint"
7
+ import reactRefresh from "eslint-plugin-react-refresh"
8
+
7
9
 
8
10
  /** @type {import('eslint').Linter.Config[]} */
9
11
  export const config = [
@@ -13,6 +15,15 @@ export const config = [
13
15
  pluginJs.configs.recommended,
14
16
  pluginImport.flatConfigs.recommended,
15
17
  ...tseslint.configs.recommended,
18
+ reactRefresh.configs.recommended,
19
+ {
20
+ rules: {
21
+ "react-refresh/only-export-components": [
22
+ "warn",
23
+ { "allowExportNames": ["loader", "*Variant"] }
24
+ ]
25
+ },
26
+ },
16
27
  {
17
28
  ...pluginReact.configs.flat.recommended,
18
29
  settings: {
@@ -47,18 +58,14 @@ export const config = [
47
58
  "builtin",
48
59
  "external",
49
60
  "internal",
50
- // Then sibling and parent imports. They can be mingled together
51
61
  ["sibling", "parent"],
52
- // Then index file imports
53
62
  "index",
54
- // Then any arcane TypeScript imports
55
63
  "object",
56
- // Then the omitted imports: internal, external, type, unknown
57
64
  ],
58
65
  "pathGroups": [
59
66
  {
60
67
  "pattern": "@rpcbase/**",
61
- "group": "internal",
68
+ "group": "external",
62
69
  "position": "before"
63
70
  },
64
71
  {
@@ -66,10 +73,10 @@ export const config = [
66
73
  "group": "internal",
67
74
  "position": "before"
68
75
  },
69
- // {
70
- // "pattern": "@/**",
71
- // "group": "internal"
72
- // }
76
+ {
77
+ "pattern": "@/**",
78
+ "group": "internal"
79
+ }
73
80
  ],
74
81
  "newlines-between": "always",
75
82
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/eslint-config",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -37,6 +37,7 @@
37
37
  "eslint-import-resolver-typescript": "4.3.2",
38
38
  "eslint-plugin-import": "2.31.0",
39
39
  "eslint-plugin-react": "7.37.5",
40
+ "eslint-plugin-react-refresh": "0.4.19",
40
41
  "globals": "16.0.0",
41
42
  "typescript-eslint": "8.30.1"
42
43
  },