I have this error, I got this error on compilation process:
"@typescript-eslint" was conflicted between ".eslintrc.js" and ".eslintrc.js » @react-native-community/eslint-config#overrides[1]"
My eslint configuration is:
module.exports = {
root: true,
extends: ['@react-native-community', 'plugin:storybook/recommended'],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
overrides: [{
files: ['*.ts', '*.tsx'],
rules: {
'@typescript-eslint/no-shadow': ['error'],
'no-shadow': 'off',
'no-undef': 'off'
}
}]
};
Any solutions/fixes?
2
Answers
Finally, I fixed this error:
Check your project's dependencies and make sure that you don't have conflicting versions of the
eslint-plugin-react
package installed. You can do this by running the following command in your project directory:This will show you a tree of your project's dependencies, including any conflicting versions of the
eslint-plugin-react
package. If you see any conflicts, you can try runningnpm dedupe
to resolve them.