@willbooster/eslint-config-next 2.5.5 → 2.5.7

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 +12 -19
  2. package/package.json +15 -15
package/eslint.config.js CHANGED
@@ -1,12 +1,10 @@
1
1
  /* eslint-disable unicorn/no-null */
2
2
 
3
- import path from 'node:path';
4
- import { fileURLToPath } from 'node:url';
5
-
6
- import { FlatCompat } from '@eslint/eslintrc';
7
3
  import js from '@eslint/js';
4
+ import eslintPluginNext from '@next/eslint-plugin-next';
8
5
  import eslintConfigFlatGitignore from 'eslint-config-flat-gitignore';
9
6
  import eslintConfigPrettier from 'eslint-config-prettier';
7
+ import eslintPluginImportX from 'eslint-plugin-import-x';
10
8
  import eslintPluginReact from 'eslint-plugin-react';
11
9
  import eslintPluginReactCompiler from 'eslint-plugin-react-compiler';
12
10
  import eslintPluginSortClassMembers from 'eslint-plugin-sort-class-members';
@@ -16,20 +14,14 @@ import eslintPluginUnusedImports from 'eslint-plugin-unused-imports';
16
14
  import globals from 'globals';
17
15
  import tseslint from 'typescript-eslint';
18
16
 
19
- // mimic CommonJS variables -- not needed if using CommonJS
20
- const __filename = fileURLToPath(import.meta.url);
21
- const __dirname = path.dirname(__filename);
22
-
23
- const compat = new FlatCompat({
24
- baseDirectory: __dirname,
25
- });
17
+ const { flatConfig: eslintPluginNextFlatConfig } = eslintPluginNext;
26
18
 
27
19
  const config = [
28
- ...compat.extends('next/core-web-vitals'),
20
+ eslintPluginNextFlatConfig.coreWebVitals,
29
21
 
30
- // We import configs of eslint-config-js/js-react/ts/ts-react manually
31
- // because next/core-web-vitals depends on eslint-plugin-import,
32
- // but we want to keep using eslint-plugin-import-x in the above configs.
22
+ // We import configs of eslint-config-js/js-react/ts/ts-react manually so
23
+ // the Next.js rules layer on top of our standard setups powered by
24
+ // eslint-plugin-import-x.
33
25
 
34
26
  // --------------- from eslint-config-js ---------------
35
27
  // Note: don't merge the below two objects!
@@ -66,6 +58,7 @@ const config = [
66
58
  eslintPluginUnicorn.configs.recommended,
67
59
  {
68
60
  plugins: {
61
+ 'import-x': eslintPluginImportX,
69
62
  'sort-class-members': eslintPluginSortClassMembers,
70
63
  'sort-destructure-keys': eslintPluginSortDestructureKeys,
71
64
  },
@@ -86,9 +79,9 @@ const config = [
86
79
  'object-shorthand': 'error',
87
80
  'one-var': ['error', 'never'], // We prefer one variable declaration per line.
88
81
  'spaced-comment': 'error', // Enforce consistency of spacing after the start of a comment // or /*.
89
- 'import/newline-after-import': 'error',
90
- 'import/no-duplicates': 'error',
91
- 'import/order': [
82
+ 'import-x/newline-after-import': 'error',
83
+ 'import-x/no-duplicates': 'error',
84
+ 'import-x/order': [
92
85
  'error',
93
86
  {
94
87
  'newlines-between': 'always',
@@ -302,7 +295,7 @@ const config = [
302
295
  'src/pages/api/**/*.ts',
303
296
  ],
304
297
  rules: {
305
- 'import/no-default-export': 'off',
298
+ 'import-x/no-default-export': 'off',
306
299
  },
307
300
  },
308
301
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/eslint-config-next",
3
- "version": "2.5.5",
3
+ "version": "2.5.7",
4
4
  "description": "A ESLint flat config for Next.js",
5
5
  "license": "Apache-2.0",
6
6
  "author": "WillBooster Inc.",
@@ -23,15 +23,15 @@
23
23
  "prettier": "@willbooster/prettier-config",
24
24
  "devDependencies": {
25
25
  "@eslint/eslintrc": "3.3.1",
26
- "@eslint/js": "9.33.0",
26
+ "@eslint/js": "9.37.0",
27
27
  "@types/eslint": "9.6.1",
28
28
  "@types/micromatch": "4.0.9",
29
- "@types/node": "24.2.1",
30
- "@types/react": "19.1.9",
29
+ "@types/node": "24.6.2",
30
+ "@types/react": "19.2.0",
31
31
  "@willbooster/prettier-config": "10.2.0",
32
- "eslint": "9.33.0",
32
+ "eslint": "9.35.0",
33
33
  "eslint-config-flat-gitignore": "2.1.0",
34
- "eslint-config-next": "15.4.6",
34
+ "eslint-config-next": "15.5.4",
35
35
  "eslint-config-prettier": "10.1.8",
36
36
  "eslint-import-resolver-typescript": "4.4.4",
37
37
  "eslint-plugin-import-x": "4.16.1",
@@ -40,18 +40,18 @@
40
40
  "eslint-plugin-react-hooks": "5.2.0",
41
41
  "eslint-plugin-sort-class-members": "1.21.0",
42
42
  "eslint-plugin-sort-destructure-keys": "2.0.0",
43
- "eslint-plugin-unicorn": "60.0.0",
44
- "eslint-plugin-unused-imports": "4.1.4",
45
- "globals": "16.3.0",
46
- "lint-staged": "16.1.5",
43
+ "eslint-plugin-unicorn": "61.0.2",
44
+ "eslint-plugin-unused-imports": "4.2.0",
45
+ "globals": "16.4.0",
46
+ "lint-staged": "16.2.3",
47
47
  "micromatch": "4.0.8",
48
- "next": "15.4.6",
48
+ "next": "15.5.4",
49
49
  "prettier": "3.6.2",
50
- "prettier-plugin-java": "2.7.4",
51
- "react": "19.1.1",
50
+ "prettier-plugin-java": "2.7.5",
51
+ "react": "19.2.0",
52
52
  "sort-package-json": "3.4.0",
53
- "typescript": "5.9.2",
54
- "typescript-eslint": "8.39.0",
53
+ "typescript": "5.9.3",
54
+ "typescript-eslint": "8.45.0",
55
55
  "use-immer": "0.11.0"
56
56
  },
57
57
  "peerDependencies": {