Skip to content

Latest commit

Β 

History

History
46 lines (32 loc) Β· 997 Bytes

File metadata and controls

46 lines (32 loc) Β· 997 Bytes

require-module-attributes

πŸ“ Require non-empty module attributes for imports and exports.

πŸ’Ό This rule is enabled in the following configs: βœ… recommended, β˜‘οΈ unopinionated.

πŸ”§ This rule is automatically fixable by the --fix CLI option.

Enforce non-empty attribute list in import/export statements and import() expressions.

Examples

// ❌
import foo from 'foo' with {};

// βœ…
import foo from 'foo';
// ❌
export {foo} from 'foo' with {};

// βœ…
export {foo} from 'foo';
// ❌
const foo = await import('foo', {});

// βœ…
const foo = await import('foo');
// ❌
const foo = await import('foo', {with: {}});

// βœ…
const foo = await import('foo');