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

fix full lodash import trailing slash #195

Merged
merged 1 commit into from
Apr 12, 2020
Merged

fix full lodash import trailing slash #195

merged 1 commit into from
Apr 12, 2020

Conversation

preynal
Copy link
Contributor

@preynal preynal commented Dec 12, 2018

Apparently, using import _ from "lodash/" (notice the trailing /) is a way to bypass the single import method rule. I've added an optional match on the regex.

This is what is happening:

/*eslint lodash/import-scope: [2, "method"]*/
import _ from "lodash/"

whereas

/*eslint lodash/import-scope: [2, "method"]*/
import _ from "lodash"

throws an error / warning as expected

@coveralls
Copy link

coveralls commented Dec 12, 2018

Pull Request Test Coverage Report for Build 423

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 422: 0.0%
Covered Lines: 1904
Relevant Lines: 1904

💛 - Coveralls

@OlivierCo
Copy link

@preynal that's a fucking good fix man...

@idok idok merged commit 313d520 into wix-incubator:master Apr 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants