@comet/eslint-config 8.11.0-canary-20251217114055 → 8.11.0-canary-20251222095236

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,14 +1,20 @@
1
1
  # @comet/eslint-config
2
2
 
3
- ## 8.11.0-canary-20251217114055
3
+ ## 8.11.0-canary-20251222095236
4
4
 
5
5
  ### Minor Changes
6
6
 
7
+ - e5427a0: Future: Ban `node-cache` because it's unmaintained
8
+
9
+ Introduce a new rule in `future/nestjs` and `future/nextjs` that bans importing `node-cache` and recommends `cache-manager` / `@cacheable/node-cache` / `@nestjs/cache-manager` instead.
10
+
11
+ This rule is now in the future configs and will be enforced generally in v9.
12
+
7
13
  - 9d5e331: Enable `@typescript-eslint/consistent-type-exports` in `@comet/eslint-config/future/react.js`
8
14
 
9
15
  ### Patch Changes
10
16
 
11
- - @comet/eslint-plugin@8.11.0-canary-20251217114055
17
+ - @comet/eslint-plugin@8.11.0-canary-20251222095236
12
18
 
13
19
  ## 8.10.0
14
20
 
@@ -0,0 +1,25 @@
1
+ import nestjsConfig from "../nestjs.js";
2
+
3
+ export const restrictedImportPaths = [
4
+ {
5
+ name: "node-cache",
6
+ message: "node-cache is abandonware. Use @nestjs/cache-manager instead",
7
+ },
8
+ ];
9
+
10
+ /** @type {import('eslint')} */
11
+ const config = [
12
+ ...nestjsConfig,
13
+ {
14
+ rules: {
15
+ "no-restricted-imports": [
16
+ "error",
17
+ {
18
+ paths: restrictedImportPaths,
19
+ },
20
+ ],
21
+ },
22
+ },
23
+ ];
24
+
25
+ export default config;
@@ -0,0 +1,26 @@
1
+ import nextjsConfig, { restrictedImportPaths as baseRestrictedImportPaths } from "../nextjs.js";
2
+
3
+ export const restrictedImportPaths = [
4
+ ...baseRestrictedImportPaths,
5
+ {
6
+ name: "node-cache",
7
+ message: "node-cache is abandonware. Use cache-manager or @cacheable/node-cache instead",
8
+ },
9
+ ];
10
+
11
+ /** @type {import('eslint')} */
12
+ const config = [
13
+ ...nextjsConfig,
14
+ {
15
+ rules: {
16
+ "no-restricted-imports": [
17
+ "error",
18
+ {
19
+ paths: restrictedImportPaths,
20
+ },
21
+ ],
22
+ },
23
+ },
24
+ ];
25
+
26
+ export default config;
package/nextjs.js CHANGED
@@ -16,6 +16,18 @@ const nextCoreWebVitals = compat
16
16
  // because it gets redefined
17
17
  .filter((config) => !config.plugins || !config.plugins.import);
18
18
 
19
+ export const restrictedImportPaths = [
20
+ {
21
+ name: "react",
22
+ importNames: ["default"],
23
+ },
24
+ {
25
+ name: "next/image",
26
+ importNames: ["default"],
27
+ message: "Please use Image from @comet/site-nextjs instead",
28
+ },
29
+ ];
30
+
19
31
  /** @type {import('eslint')} */
20
32
  const config = [
21
33
  ...coreConfig,
@@ -28,17 +40,7 @@ const config = [
28
40
  "no-restricted-imports": [
29
41
  "error",
30
42
  {
31
- paths: [
32
- {
33
- name: "react",
34
- importNames: ["default"],
35
- },
36
- {
37
- name: "next/image",
38
- importNames: ["default"],
39
- message: "Please use Image from @comet/site-nextjs instead",
40
- },
41
- ],
43
+ paths: restrictedImportPaths,
42
44
  },
43
45
  ],
44
46
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comet/eslint-config",
3
- "version": "8.11.0-canary-20251217114055",
3
+ "version": "8.11.0-canary-20251222095236",
4
4
  "description": "A set of ESLint configurations for Comet projects",
5
5
  "repository": {
6
6
  "directory": "packages/eslint-config",
@@ -13,6 +13,12 @@
13
13
  "./core.js": {
14
14
  "import": "./core.js"
15
15
  },
16
+ "./future/nestjs.js": {
17
+ "import": "./future/nestjs.js"
18
+ },
19
+ "./future/nextjs.js": {
20
+ "import": "./future/nextjs.js"
21
+ },
16
22
  "./future/react.js": {
17
23
  "import": "./future/react.js"
18
24
  },
@@ -45,7 +51,7 @@
45
51
  "globals": "^15.15.0",
46
52
  "npm-run-all2": "^8.0.0",
47
53
  "typescript-eslint": "^8.24.1",
48
- "@comet/eslint-plugin": "8.11.0-canary-20251217114055"
54
+ "@comet/eslint-plugin": "8.11.0-canary-20251222095236"
49
55
  },
50
56
  "devDependencies": {
51
57
  "eslint": "^9.30.1",