'What's the reason still showing "Prop spreading is forbidden" error after I deactivated react/jsx-props-no-spreading?
Here is my eslintrc.json looks like, I dialing "off" in react/jsx-props-no-spreading
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"env": {
"browser": true,
"node": true,
"jest": true,
"es6": true
},
"globals": {
"browser": false,
"$": false
},
"plugins": ["react", "react-hooks"],
"settings": {
"react": {
"version": "detect"
},
"import/resolver": {
"node": {
"paths": ["src"]
}
}
},
"ignorePatterns": ["**/*.jsonc"],
"overrides": [
{
"files": ["*.js", "*.jsx"],
"extends": [
"@expedia-ui/eslint-config",
"eslint:recommended",
"plugin:react/recommended",
"prettier"
]
},
{
"files": ["*.ts", "*.tsx"],
"extends": [
"@expedia-ui/eslint-config",
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"@typescript-eslint/ban-ts-comment": [
"error",
{
"ts-ignore": "allow-with-description"
}
],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"class-methods-use-this": "off",
"no-shadow": "off",
"import/no-extraneous-dependencies": "off",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error", {"variables": false}],
"import/extensions": "off",
"react/prop-types": "off",
"react/require-default-props": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"global-require": "off",
"import/no-dynamic-require": "off",
"camelcase": "off",
"react/jsx-props-no-spreading": "off",
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": "off",
"@angular-eslint/no-empty-lifecycle-method": "off"
}
}
]
}
But inside my code I'm still getting error " Prop spreading is forbidden react/jsx-props-no-spreading", the only thing I can do is using "// eslint-disable jsx-props-no-spreading" several times, can anyone let me know why it doesn't work and fix this issue? Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
