Skip to main content

no-duplicate-imports

Disallow duplicate imports.

Attributes

  • Included in configs
    • ✅ Recommended
    • 🔒 Strict
  • Fixable
    • 🔧 Automated Fixer
    • 💡 Suggestion Fixer
  • 💭 Requires type information
Deprecated

This rule has been deprecated in favour of the import/no-duplicates rule.

How to Use

.eslintrc.cjs
module.exports = {
// Note: you must disable the base rule as it can report incorrect errors
"no-duplicate-imports": "off",
"@typescript-eslint/no-duplicate-imports": "warn"
};

Options

See eslint/no-duplicate-imports options.

Taken with ❤️ from ESLint core

Resources