Avoid duplicate module imports
ID: typescript-code-style/no-duplicate-imports
Language: TypeScript
Severity: Warning
Category: Best Practices
Description
Single imports are easier to read and maintain you can see everything being imported from a module in one line.
Non-Compliant Code Examples
import type { merge } from 'module';
import { merge } from 'module';
import something from 'another-module';
import { find } from 'module';
import type { merge } from 'module';
import { merge } from 'module';
import something from 'another-module';
import { find } from 'module';
import something from 'something';
import { find } from 'something';
Compliant Code Examples
import type { MaybePromise } from '@datadog-vscode/common/utils';
import { asyncMap } from '@datadog-vscode/common/utils';
import { merge, find } from 'module';
import something from 'another-module';
// not mergeable
import { merge } from 'something';
import * as something from 'something';
Seamless integrations. Try Datadog Code Analysis