Skip to content

Commit

Permalink
Add eslint-plugin-import 'export' rule to base rules
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhabib committed Nov 20, 2024
1 parent a7e15de commit c21031f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .changeset/cold-scissors-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'eslint-config-seek': minor
---

Add [export][docs] as an error.
This disallows repeated exports of names or defaults.

[docs]: https://github.com/import-js/eslint-plugin-import/blob/v2.29.1/docs/rules/export.md
2 changes: 2 additions & 0 deletions base.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ module.exports = [
// However, there is a pending PR which improves the behaviour of this rule https://github.com/import-js/eslint-plugin-import/pull/2716
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-duplicates.md#inline-type-imports
'import-x/no-duplicates': [ERROR, { 'prefer-inline': true }],
'import-x/export': ERROR,
},
},
{
Expand All @@ -207,6 +208,7 @@ module.exports = [
{ commonjs: true, amd: true, ignore: ['.svg$', '^file?'] },
],
'import-x/no-duplicates': ERROR,
'import-x/export': ERROR,
},
},
{
Expand Down

0 comments on commit c21031f

Please sign in to comment.