Skip to content

Commit 5793301

Browse files
fix(lint): disable react/no-unknown-property (#40331)
~(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
1 parent 712d98d commit 5793301

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/eslint-config-next/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ module.exports = {
6060
plugins: ['import', 'react', 'jsx-a11y'],
6161
rules: {
6262
'import/no-anonymous-default-export': 'warn',
63+
'react/no-unknown-property': 'off',
6364
'react/react-in-jsx-scope': 'off',
6465
'react/prop-types': 'off',
6566
'jsx-a11y/alt-text': [

0 commit comments

Comments
 (0)