Skip to content

akiogitgit/eslint-plugin-no-duplicates-imported-name

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eslint-plugin-no-duplicates-imported-name

Installing

You'll first need to install ESLint

npm i -D eslint

Next, you install this plugin

npm i -D eslint-plugin-no-duplicates-imported-name

Usage

Add it to your eslint config

// .eslintrc.json
{
  "plugins": [
    "no-duplicates-imported-name"
  ],
  "rules": {
    "no-duplicates-imported-name/no-duplicates-imported-name": "error",
  }
}

Rule

🔧 This rule is automatically fixable by the --fix CLI option.

❌ Incorrect

import { A, A } from 'Foo';
import type { B, B, C } from 'Bar';
import D, { E, F, E } from 'Hoge';

✅ Correct

import { A } from 'Foo';
import type { B, C } from 'Bar';
import D, { E, F } from 'Hoge';
import G from "Baz"
import "Hoge"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published