Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint: add plugin to warn against src imports #10234

Merged
merged 1 commit into from
Oct 8, 2021

Conversation

vince-fugnitto
Copy link
Member

What it does

The pull-request adds a new no-src-import rule to our custom eslint-plugin in order to warn against the use of /src/ imports over /lib/ which causes the build to fail and is not trivial for developers to identify as to why. The rule should help write developers more easily identify when they are using imports incorrectly.

How to test

  • the CI should be green (baseline is clean).
  • using src imports should produce errors.
  • a quick-fix should exist to change these src imports to lib.

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto [email protected]

@vince-fugnitto vince-fugnitto added linting issues related to linting contributor experience issues related to the contributor experience labels Oct 5, 2021
@vince-fugnitto vince-fugnitto self-assigned this Oct 5, 2021
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

  • Using an import from src shows a linting error
  • A working quick-fix is provided for the error
  • CI is green 🟢

@vince-fugnitto vince-fugnitto force-pushed the vf/no-src-import branch 2 times, most recently from 1cbb94e to 498890f Compare October 8, 2021 16:59
The commit adds a new `no-src-import` rule to our custom eslint-plugin
in order to warn against the use of `/src/` imports over `/lib/` which
causes the build to fail and is not trivial for developers to identify
as to why. The rule should help write developers more easily identify
when they are using imports incorrectly.

Signed-off-by: vince-fugnitto <[email protected]>
@vince-fugnitto vince-fugnitto merged commit 6bc49ae into master Oct 8, 2021
@vince-fugnitto vince-fugnitto deleted the vf/no-src-import branch October 8, 2021 18:13
@github-actions github-actions bot added this to the 1.19.0 milestone Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor experience issues related to the contributor experience linting issues related to linting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants