require-module-specifiers

March 27, 2026 ยท View on GitHub

๐Ÿ“ Require non-empty specifier list in import and export statements.

๐Ÿ’ผ This rule is enabled in the following configs: โœ… recommended, โ˜‘๏ธ unopinionated.

๐Ÿ”ง๐Ÿ’ก This rule is automatically fixable by the --fix CLI option and manually fixable by editor suggestions.

Enforce non-empty specifier list in import and export statements. Use a side-effect import if needed, or remove the statement.

Examples

// โŒ
import {} from 'foo';

// โœ…
import 'foo';
// โŒ
import foo, {} from 'foo';

// โœ…
import foo from 'foo';
// โŒ
export {} from 'foo';

// โœ…
import 'foo';
// โŒ
export {}