Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(linter): update eslint-import-plugin to a version that supports eslint v9 #28273

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
"eslint-config-next": "14.2.3",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-cypress": "2.14.0",
"eslint-plugin-import": "2.30.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-playwright": "^1.6.2",
"eslint-plugin-react": "7.35.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/eslint-plugin/src/flat-configs/react-base.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { fixupPluginRules } from '@eslint/compat';
import * as importPlugin from 'eslint-plugin-import';
import globals from 'globals';
import tseslint from 'typescript-eslint';
Expand All @@ -19,7 +18,7 @@ import tseslint from 'typescript-eslint';
* https://github.com/facebook/create-react-app/blob/567f36c9235f1e1fd4a76dc6d1ae00be754ca047/packages/eslint-config-react-app/index.js
*/
export default tseslint.config({
plugins: { import: fixupPluginRules(importPlugin) },
plugins: { import: importPlugin },
languageOptions: {
globals: {
...globals.browser,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,21 +150,6 @@ export function convertEslintJsonToFlatConfig(
isFlatCompatNeeded = true;
}
exportElements.push(generateFlatOverride(override));

// eslint-plugin-import cannot be used with ESLint v9 yet
// TODO(jack): Once v9 support is released, remove this block.
// See: https://github.com/import-js/eslint-plugin-import/pull/2996
if (override.extends === 'plugin:@nx/react') {
exportElements.push(
generateFlatOverride({
rules: {
'import/first': 'off',
'import/no-amd': 'off',
'import/no-webpack-loader-syntax': 'off',
},
})
);
}
});
}

Expand Down
9 changes: 9 additions & 0 deletions packages/react/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,15 @@
"alwaysAddToPackageJson": false
}
}
},
"20.0.0": {
"version": "20.0.0-beta.8",
"packages": {
"eslint-plugin-import": {
"version": "2.31.0",
"alwaysAddToPackageJson": false
}
}
}
}
}
2 changes: 1 addition & 1 deletion packages/react/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const testingLibraryReactVersion = '15.0.6';
export const reduxjsToolkitVersion = '1.9.3';
export const reactReduxVersion = '8.0.5';

export const eslintPluginImportVersion = '2.30.0';
export const eslintPluginImportVersion = '2.31.0';
export const eslintPluginJsxA11yVersion = '6.7.1';
export const eslintPluginReactVersion = '7.35.0';
export const eslintPluginReactHooksVersion = '4.6.0';
Expand Down
74 changes: 54 additions & 20 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.