Skip to content

Commit

Permalink
Move ESLint config outside of the eslint-plugin package
Browse files Browse the repository at this point in the history
  • Loading branch information
tyxla committed Nov 19, 2024
1 parent eaa84d7 commit 3bfdcd2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 10 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ module.exports = {
'plugin:eslint-comments/recommended',
'plugin:storybook/recommended',
],
plugins: [ 'react-compiler' ],
globals: {
wp: 'off',
globalThis: 'readonly',
Expand Down Expand Up @@ -222,6 +223,15 @@ module.exports = {
definedTags: [ 'jest-environment' ],
},
],
'react-compiler/react-compiler': [
'error',
{
environment: {
enableTreatRefLikeIdentifiersAsRefs: true,
validateRefAccessDuringRender: false,
},
},
],
},
overrides: [
{
Expand Down
11 changes: 1 addition & 10 deletions packages/eslint-plugin/configs/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
version: 'detect',
},
},
plugins: [ '@wordpress', 'react-compiler', 'react', 'react-hooks' ],
plugins: [ '@wordpress', 'react', 'react-hooks' ],
rules: {
'@wordpress/no-unused-vars-before-return': [
'error',
Expand All @@ -34,15 +34,6 @@ module.exports = {
'react/no-children-prop': 'off',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'react-compiler/react-compiler': [
'error',
{
environment: {
enableTreatRefLikeIdentifiersAsRefs: true,
validateRefAccessDuringRender: false,
},
},
],
'react-hooks/exhaustive-deps': [
'warn',
{
Expand Down

0 comments on commit 3bfdcd2

Please sign in to comment.