I am updating eslint rules in my React project.
Currently I have this in the extend
property inside eslintrc.js
:
extends: [
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
// "plugin:@typescript-eslint/recommended",
// "plugin:@typescript-eslint/recommended-requiring-type-checking",
// "plugin:eslint-comments/recommended",
'plugin:react/recommended',
'plugin:jest/recommended',
'plugin:prettier/recommended',
],
I am getting this error:
error 'default' is restricted from being used as an exported name no-restricted-exports
Our pattern for components is like this:
Button/
- Button.tsx
- Button.spec.ts
- Button.stories.tsx
- index.ts
index.ts:
export { default } from './Button';
How to fix this? Or do I have to override this eslint rule somehow?