-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(eslint)!: harden no-default-export rule (#370)
Enables the `import-x/no-default-export` rule for all `(j|t)sx` files, with the exception of config files in the project root. When the eslint-plugin-next module is detected, an automatic exclusion is done for Next.js' special files like `layout.tsx`, `page.tsx` or `sitemap.tsx` that require you to do a default export. If you really like default exports, or need a soft-upgrade path, add something like the following snippet to your `eslint.config.js`. ```json5 { // We have the convention to default export components. files: ["**/*.tsx"], rules: { "import-x/no-default-export": "off", }, }, ``` Signed-off-by: Dirk de Visser <[email protected]>
- Loading branch information
Showing
3 changed files
with
14 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters