Skip to content

Commit

Permalink
fix(lint): disable react/no-unknown-property (#40331)
Browse files Browse the repository at this point in the history
~(PR jsx-eslint/eslint-plugin-react#3377)
introduced a change in `[email protected]` that will now show
an error when unknown properties appear on elements. We can opt out of
this by overriding the default.~

As discussed internally, we are turning `react/no-unknown-property` off,
as it might be confusing even if different props are being used, (eg.:
`css` for `emotion`).

It's easy to fix
https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md#rule-options,
but it might not be clear at first glance that Next.js is using
`eslint-plugin-react` internally.

If the user wants to enforce this rule, they can still add it to their
own `rules` config.

Fixes #40321, ref: #40269,
#38333
  • Loading branch information
balazsorban44 authored Sep 8, 2022
1 parent 712d98d commit 5793301
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/eslint-config-next/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ module.exports = {
plugins: ['import', 'react', 'jsx-a11y'],
rules: {
'import/no-anonymous-default-export': 'warn',
'react/no-unknown-property': 'off',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'jsx-a11y/alt-text': [
Expand Down

0 comments on commit 5793301

Please sign in to comment.