Skip to content

Commit

Permalink
Forbid empty named import blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
stormwarning committed Jan 24, 2024
1 parent 1e9ed9c commit 2ba4466
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/tidy-meals-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@zazen/eslint-config": minor
---

Add `import/no-empty-named-blocks` rule
8 changes: 8 additions & 0 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ const config = {
*/
'import/no-duplicates': ['error', { 'prefer-inline': true }],

/**
* Forbid empty named import blocks. Might be redundant with
* other rules, but enabled just in case.
*
* @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-empty-named-blocks.md
*/
'import/no-empty-named-blocks': 'error',

/**
* Allow importing devDependencies within test files.
* @see https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md
Expand Down

0 comments on commit 2ba4466

Please sign in to comment.