-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor!: migrate from eslint-plugin-react to eslint-react #157
Conversation
'react/require-default-props': 'off', | ||
'@eslint-react/naming-convention/filename-extension': ['warn', { extensions: ['.jsx', '.tsx'] }], | ||
'@eslint-react/jsx/no-missing-key': ['error'], | ||
'@eslint-react/jsx/no-useless-fragment': ['error'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2a2c680
to
cc7539c
Compare
'warn', | ||
{ extensions: ['.jsx', '.tsx'] }, | ||
], | ||
'@eslint-react/no-missing-key': ['error'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rule is already included in the plugin:@eslint-react/recommended-legacy
preset. May we omit it?
'react/require-default-props': 'off', | ||
'@eslint-react/naming-convention/filename-extension': [ | ||
'warn', | ||
{ extensions: ['.jsx', '.tsx'] }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eslint-react/naming-convention/filename-extension
already defaults to "extensions": [".jsx", ".tsx"]
. May we omit it?
In contrast, react/jsx-filename-extension
defaults to "extensions": [".jsx"]
, thus we are manually set extensions
in the past.
References:
@eslint-react/naming-convention/filename-extension
: https://eslint-react.xyz/rules/naming-convention-filename-extensionreact/jsx-filename-extension
: https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.mdreact/jsx-filename-extension
issue about.tsx
extension: Default values for the React /jsx-filename-extension rule jsx-eslint/eslint-plugin-react#2919
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I will remove them. Previously, what I considered was to explicitly declare the rule configuration to avoid being affected by upstream changes.
However, we have corresponding config-snapshot.test.ts, so even if the default configuration upstream changes, we can still observe it here.
f482ef6
to
b570b2d
Compare
b570b2d
to
70ca097
Compare
Description
Solve #156
[Rule Migration] migrate eslint-plugin-react rules.