1.0.2 ā€¢ Published 6 months ago

eslint-plugin-no-duplicates-imported-name v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

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"
1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago