microsoft / microsoft/fluentui

feat(eslint): prevent duplicate module import paths

Open
#22,049 19 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Build System Area: Linting Package: eslint-plugin Resolution: Soft Close
Dominant language
TypeScript
Stars
20.3k
Forks
2.9k
Avg merge
2d 9h
Merged PRs (30d)
46

Description

Describe the issue:
Actual behavior:

Following code wont' be autofix nor triggers lint warnings:

import {Foo} from '@fluentui/hello'
import {Yolo} from '../life'
import {Bar} from '@fluentui/hello'
import {Long} from '../life'
Expected behavior:

module path duplicates should trigger lint warnings, ideally should be autofixed on save/pre-commit

import {Foo} from '@fluentui/hello'
import {Yolo} from '../life'
import {Bar} from '@fluentui/hello'
import {Long} from '../life'

↓↓↓

import {Foo, Bar} from '@fluentui/hello'
import {Yolo, Long} from '../life'
Related

https://github.com/microsoft/fluentui/pull/21924#issuecomment-1063217633

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the repository's ESLint import rules and reproduce the issue with the duplicate-import example in this report. Done means duplicate module paths produce lint warnings and are combined by autofix without changing the imported bindings; add or update rule tests for the shown cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.