Skip to content

Commit

Permalink
feat(linter): update eslint-import-plugin to a version that supports …
Browse files Browse the repository at this point in the history
…eslint v9
  • Loading branch information
leosvelperez committed Oct 3, 2024
1 parent 874fad0 commit 68def26
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 39 deletions.
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
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.

0 comments on commit 68def26

Please sign in to comment.