-
Notifications
You must be signed in to change notification settings - Fork 50.4k
Closed
Labels
Resolution: StaleAutomatically closed due to inactivityAutomatically closed due to inactivity
Description
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
If you are using eslint-plugin-react-hooks you need to put rules configuration manually. What if in the next version you will add some more rules?
Should everyone who use it after future release add all the new rules to config manually?
What is the expected behavior?
I propose instead of instructing on every new rule to create recommended config as in eslint-plugin-react, as follows:
export default {
rules: {
'rules-of-hooks': RuleOfHooks,
'exhaustive-deps': ExhaustiveDeps
},
configs: {
recommended: {
plugins: [ 'react-hooks' ],
parserOptions: {
ecmaFeatures: { jsx: true }
},
rules: {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn'
}
}
}
};
Also, to instruct to extend instead:
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended'
],
sargant, marcelmokos, silvenon, maximandrews, linvain and 8 more
Metadata
Metadata
Assignees
Labels
Resolution: StaleAutomatically closed due to inactivityAutomatically closed due to inactivity