@comet/eslint-config 8.11.0-canary-20251211150434 → 8.11.0-canary-20251215080607

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @comet/eslint-config
2
2
 
3
- ## 8.11.0-canary-20251211150434
3
+ ## 8.11.0-canary-20251215080607
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  ### Patch Changes
10
10
 
11
- - @comet/eslint-plugin@8.11.0-canary-20251211150434
11
+ - @comet/eslint-plugin@8.11.0-canary-20251215080607
12
12
 
13
13
  ## 8.10.0
14
14
 
package/future/react.js CHANGED
@@ -24,3 +24,4 @@ const config = [
24
24
  ];
25
25
 
26
26
  export default config;
27
+ export { restrictedImportPaths } from "../react.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comet/eslint-config",
3
- "version": "8.11.0-canary-20251211150434",
3
+ "version": "8.11.0-canary-20251215080607",
4
4
  "description": "A set of ESLint configurations for Comet projects",
5
5
  "repository": {
6
6
  "directory": "packages/eslint-config",
@@ -45,7 +45,7 @@
45
45
  "globals": "^15.15.0",
46
46
  "npm-run-all2": "^8.0.0",
47
47
  "typescript-eslint": "^8.24.1",
48
- "@comet/eslint-plugin": "8.11.0-canary-20251211150434"
48
+ "@comet/eslint-plugin": "8.11.0-canary-20251215080607"
49
49
  },
50
50
  "devDependencies": {
51
51
  "eslint": "^9.30.1",
package/react.js CHANGED
@@ -8,6 +8,46 @@ import reactHooks from "eslint-plugin-react-hooks";
8
8
 
9
9
  const cometAdminImportsRestrictedFromMuiMaterial = ["Alert", "Button", "Dialog", "Tooltip"];
10
10
 
11
+ export const restrictedImportPaths = [
12
+ ...cometAdminImportsRestrictedFromMuiMaterial.map((name) => ({
13
+ name: "@mui/material",
14
+ importNames: [name],
15
+ message: `Please use ${name} from @comet/admin instead`,
16
+ })),
17
+ ...cometAdminImportsRestrictedFromMuiMaterial.map((name) => ({
18
+ name: `@mui/material/${name}`,
19
+ message: `Please use ${name} from @comet/admin instead`,
20
+ })),
21
+ {
22
+ name: "react",
23
+ importNames: ["default"],
24
+ },
25
+ {
26
+ name: "@mui/material",
27
+ importNames: ["styled"],
28
+ message: "Please use styled from @mui/material/styles instead.",
29
+ },
30
+ {
31
+ name: "@mui/icons-material",
32
+ message: "Please use @comet/admin-icons instead",
33
+ },
34
+ {
35
+ name: "@mui/x-data-grid",
36
+ importNames: ["GridColDef"],
37
+ message: "Please use GridColDef from @comet/admin instead",
38
+ },
39
+ {
40
+ name: "@mui/x-data-grid-pro",
41
+ importNames: ["GridColDef"],
42
+ message: "Please use GridColDef from @comet/admin instead",
43
+ },
44
+ {
45
+ name: "@mui/x-data-grid-premium",
46
+ importNames: ["GridColDef"],
47
+ message: "Please use GridColDef from @comet/admin instead",
48
+ },
49
+ ];
50
+
11
51
  /** @type {import('eslint')} */
12
52
  const config = [
13
53
  ...coreConfig,
@@ -70,45 +110,7 @@ const config = [
70
110
  "no-restricted-imports": [
71
111
  "error",
72
112
  {
73
- paths: [
74
- ...cometAdminImportsRestrictedFromMuiMaterial.map((name) => ({
75
- name: "@mui/material",
76
- importNames: [name],
77
- message: `Please use ${name} from @comet/admin instead`,
78
- })),
79
- ...cometAdminImportsRestrictedFromMuiMaterial.map((name) => ({
80
- name: `@mui/material/${name}`,
81
- message: `Please use ${name} from @comet/admin instead`,
82
- })),
83
- {
84
- name: "react",
85
- importNames: ["default"],
86
- },
87
- {
88
- name: "@mui/material",
89
- importNames: ["styled"],
90
- message: "Please use styled from @mui/material/styles instead.",
91
- },
92
- {
93
- name: "@mui/icons-material",
94
- message: "Please use @comet/admin-icons instead",
95
- },
96
- {
97
- name: "@mui/x-data-grid",
98
- importNames: ["GridColDef"],
99
- message: "Please use GridColDef from @comet/admin instead",
100
- },
101
- {
102
- name: "@mui/x-data-grid-pro",
103
- importNames: ["GridColDef"],
104
- message: "Please use GridColDef from @comet/admin instead",
105
- },
106
- {
107
- name: "@mui/x-data-grid-premium",
108
- importNames: ["GridColDef"],
109
- message: "Please use GridColDef from @comet/admin instead",
110
- },
111
- ],
113
+ paths: restrictedImportPaths,
112
114
  },
113
115
  ],
114
116
  },