1.0.2 ⢠Published 2 years ago
eslint-plugin-no-duplicates-imported-name v1.0.2
eslint-plugin-no-duplicates-imported-name
Installing
You'll first need to install ESLint
npm i -D eslintNext, you install this plugin
npm i -D eslint-plugin-no-duplicates-imported-nameUsage
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"