Disallow export default anonymous arrow function
Automatically fix using the current file name. (arrow-return-style/no-export-default-arrow
)
recommended
config.
🔧 This rule is automatically fixable by the --fix
CLI option.
If the default export is an anonymous arrow function, it will automatically be converted to a named function using the current file name for exporting.
File Name: use-mouse.tsx
// eslint-disable-next-line arrow-return-style/no-export-default-arrow
export default () => {
// ...
};
// ↓↓↓↓↓↓↓↓↓↓
const useMouse = () => {
// ...
};
export default useMouse;