@comet/eslint-config 9.0.0-canary-20260113132154 → 9.0.0-canary-20260121085838

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,15 +1,25 @@
1
1
  # @comet/eslint-config
2
2
 
3
- ## 9.0.0-canary-20260113132154
3
+ ## 9.0.0-canary-20260121085838
4
4
 
5
- ### Major Changes
5
+ ### Patch Changes
6
+
7
+ - @comet/eslint-plugin@9.0.0-canary-20260121085838
8
+
9
+ ## 8.11.1
6
10
 
7
- - 740dba8: Bump Next.js peer dependency to v16
11
+ ### Patch Changes
12
+
13
+ - @comet/eslint-plugin@8.11.1
8
14
 
9
- Follow the official migration guides ([v15](https://nextjs.org/docs/app/guides/upgrading/version-15), [v16](https://nextjs.org/docs/app/guides/upgrading/version-16)) to upgrade.
15
+ ## 8.11.0
10
16
 
11
17
  ### Minor Changes
12
18
 
19
+ - 4b448f6: Format.JS: enforce literal default messages
20
+
21
+ Prevent function calls or variables in `defaultMessage` which are not supported in our internationalization workflow.
22
+
13
23
  - e5427a0: Future: Ban `node-cache` because it's unmaintained
14
24
 
15
25
  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.
@@ -20,7 +30,7 @@
20
30
 
21
31
  ### Patch Changes
22
32
 
23
- - @comet/eslint-plugin@9.0.0-canary-20260113132154
33
+ - @comet/eslint-plugin@8.11.0
24
34
 
25
35
  ## 8.10.0
26
36
 
package/future/react.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import reactConfig from "../react.js";
2
+ import formatJs from "eslint-plugin-formatjs";
2
3
 
3
4
  /** @type {import('eslint')} */
4
5
  const config = [
@@ -21,6 +22,14 @@ const config = [
21
22
  ],
22
23
  },
23
24
  },
25
+ {
26
+ plugins: {
27
+ formatjs: formatJs,
28
+ },
29
+ rules: {
30
+ "formatjs/enforce-default-message": ["error", "literal"],
31
+ },
32
+ },
24
33
  ];
25
34
 
26
35
  export default config;
@@ -3,6 +3,6 @@
3
3
  * @type {import('lint-staged').Configuration}
4
4
  */
5
5
  export default {
6
- "*.{js,json,css,scss,md}": () => "pnpm lint:eslint",
7
- "*.{js,json,md,yml,yaml}": () => "pnpm lint:prettier",
6
+ "*.{ts,js,json,css,scss,md}": () => "pnpm lint:eslint",
7
+ "*.{ts,js,json,md,yml,yaml}": () => "pnpm lint:prettier",
8
8
  };
package/nextjs.js CHANGED
@@ -1,7 +1,20 @@
1
1
  import coreConfig from "./core.js";
2
2
  import react from "eslint-plugin-react";
3
3
  import globals from "globals";
4
- import nextPlugin from "@next/eslint-plugin-next";
4
+ import { FlatCompat } from "@eslint/eslintrc";
5
+
6
+ const compat = new FlatCompat({
7
+ // import.meta.dirname is available after Node.js v20.11.0
8
+ baseDirectory: import.meta.dirname,
9
+ });
10
+
11
+ const nextCoreWebVitals = compat
12
+ .config({
13
+ extends: ["next/core-web-vitals"],
14
+ })
15
+ // We need to filter out configurations from nextCoreWebVitals which define plugin.import. It is conflicting
16
+ // because it gets redefined
17
+ .filter((config) => !config.plugins || !config.plugins.import);
5
18
 
6
19
  export const restrictedImportPaths = [
7
20
  {
@@ -18,9 +31,8 @@ export const restrictedImportPaths = [
18
31
  /** @type {import('eslint')} */
19
32
  const config = [
20
33
  ...coreConfig,
21
- // Extend config from plugin instead of using eslint-config-next to prevent issues with duplicate plugins, e.g., import.
22
- // See https://nextjs.org/docs/app/api-reference/config/eslint#migrating-existing-config.
23
- nextPlugin.configs["core-web-vitals"],
34
+ // Next.js does not support ESLint v9 flat config yet - an opt-in to compatibility mode is required
35
+ ...nextCoreWebVitals,
24
36
  {
25
37
  rules: {
26
38
  "@comet/no-private-sibling-import": ["error", ["gql", "sc", "gql.generated"]],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comet/eslint-config",
3
- "version": "9.0.0-canary-20260113132154",
3
+ "version": "9.0.0-canary-20260121085838",
4
4
  "description": "A set of ESLint configurations for Comet projects",
5
5
  "repository": {
6
6
  "directory": "packages/eslint-config",
@@ -36,7 +36,8 @@
36
36
  "@calm/eslint-plugin-react-intl": "^1.4.1",
37
37
  "@eslint/eslintrc": "^3.3.3",
38
38
  "@eslint/js": "^9.30.1",
39
- "@next/eslint-plugin-next": "^16.0.3",
39
+ "@next/eslint-plugin-next": "^15.5.9",
40
+ "eslint-config-next": "^15.5.9",
40
41
  "eslint-config-prettier": "^10.1.5",
41
42
  "eslint-plugin-formatjs": "^5.4.0",
42
43
  "eslint-plugin-import": "^2.31.0",
@@ -48,9 +49,9 @@
48
49
  "eslint-plugin-simple-import-sort": "^12.1.1",
49
50
  "eslint-plugin-unused-imports": "^4.1.4",
50
51
  "globals": "^15.15.0",
51
- "npm-run-all2": "^8.0.0",
52
- "typescript-eslint": "^8.24.1",
53
- "@comet/eslint-plugin": "9.0.0-canary-20260113132154"
52
+ "npm-run-all2": "^8.0.4",
53
+ "typescript-eslint": "^8.53.0",
54
+ "@comet/eslint-plugin": "9.0.0-canary-20260121085838"
54
55
  },
55
56
  "devDependencies": {
56
57
  "eslint": "^9.30.1",
@@ -77,6 +78,6 @@
77
78
  "lint": "run-p lint:prettier lint:eslint",
78
79
  "lint:ci": "pnpm run lint",
79
80
  "lint:eslint": "eslint --max-warnings 0 *.json ",
80
- "lint:prettier": "pnpm exec prettier --check './**/*.{js,json,md,yml,yaml}'"
81
+ "lint:prettier": "pnpm exec prettier --check '*.{ts,js,json,md,yml,yaml}'"
81
82
  }
82
83
  }