Skip to content

Commit

Permalink
feat(react): update eslint plugins to be compat with eslint v9 (nrwl#…
Browse files Browse the repository at this point in the history
…28559)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes nrwl#28191
  • Loading branch information
jaysoo authored Oct 22, 2024
1 parent e345bc7 commit a354857
Show file tree
Hide file tree
Showing 6 changed files with 287 additions and 260 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@
"eslint-config-prettier": "9.1.0",
"eslint-plugin-cypress": "2.14.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-jsx-a11y": "6.10.1",
"eslint-plugin-playwright": "^1.6.2",
"eslint-plugin-react": "7.35.0",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-react-hooks": "5.0.0",
"eslint-plugin-storybook": "^0.8.0",
"express": "^4.19.2",
"fast-xml-parser": "^4.2.7",
Expand Down
1 change: 0 additions & 1 deletion packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
}
},
"dependencies": {
"@eslint/compat": "^1.1.1",
"@nx/devkit": "file:../devkit",
"@nx/js": "file:../js",
"@typescript-eslint/type-utils": "^8.0.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/eslint-plugin/src/flat-configs/react-jsx.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { fixupPluginRules } from '@eslint/compat';
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y';
import reactPlugin from 'eslint-plugin-react';
import reactHooksPlugin from 'eslint-plugin-react-hooks';
Expand All @@ -17,7 +16,7 @@ import tseslint from 'typescript-eslint';
export default tseslint.config(
{
plugins: {
'react-hooks': fixupPluginRules(reactHooksPlugin),
'react-hooks': reactHooksPlugin,
},
rules: reactHooksPlugin.configs.recommended.rules,
},
Expand Down
13 changes: 13 additions & 0 deletions packages/react/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,19 @@
"alwaysAddToPackageJson": false
}
}
},
"20.1.0": {
"version": "20.1.0-beta.0",
"packages": {
"eslint-plugin-react-hooks": {
"version": "5.0.0",
"alwaysAddToPackageJson": false
},
"eslint-plugin-jsx-a11y": {
"version": "6.10.1",
"alwaysAddToPackageJson": false
}
}
}
}
}
4 changes: 2 additions & 2 deletions packages/react/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export const reduxjsToolkitVersion = '1.9.3';
export const reactReduxVersion = '8.0.5';

export const eslintPluginImportVersion = '2.31.0';
export const eslintPluginJsxA11yVersion = '6.7.1';
export const eslintPluginJsxA11yVersion = '6.10.1';
export const eslintPluginReactVersion = '7.35.0';
export const eslintPluginReactHooksVersion = '4.6.0';
export const eslintPluginReactHooksVersion = '5.0.0';

export const babelPluginStyledComponentsVersion = '1.10.7';

Expand Down
Loading

0 comments on commit a354857

Please sign in to comment.