noRedundantDefaultExport
Цей контент ще не доступний вашою мовою.
Summary
Section titled “Summary”- Rule available since:
v2.3.14 - Diagnostic Category:
lint/nursery/noRedundantDefaultExport - This rule doesn’t have a fix.
- The default severity of this rule is warning.
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "noRedundantDefaultExport": "error" } } }}Description
Section titled “Description”Checks if a default export exports the same symbol as a named export.
This rule warns when a default export references the same identifier as a named export.
Re-exports are out of scope.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”export const foo = 42;export default foo;code-block.js:2:16 lint/nursery/noRedundantDefaultExport ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Default export exports the same symbol as a named export.
1 │ export const foo = 42;
> 2 │ export default foo;
│ ^^^
3 │
ℹ Exporting the same identifier as both a named export and a default export is redundant.
ℹ Remove either the default export or the named export to avoid redundancy.
ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
export const foo = 42;export default 42;Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.