'my eslint-plugin-react-hooks doesn't work
module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
extends: ['airbnb', 'prettier', 'eslint:recommended', 'plugin:prettier/recommended'],
// prettier/react 추가
parser: 'babel-eslint',
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module',
allowImportExportEverywhere: true,
},
rules: {
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'import/no-unresolved': 0,
'prettier/prettier': 0,
'react/prop-types': 'off',
'react/destructuring-assignment': 'warn',
},
};
here is my .esLintrc. After applying airbnb eslint this time, the 'react/destruction-assignment' warning doesn't work. Is there any problem with my .esLintrc.file?
I touched my .esLintrc settings a little, but it doesn't work.
Solution 1:[1]
The rule value you are using is wrong, thats why its not working.
The rule can be set to either of always or never like:
"react/destructuring-assignment": [<enabled>, 'always']
You can also see this link for reference of this rule.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ashishssoni |
