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

Bug: false trigger on valid imports #60

Closed
AlexandrHoroshih opened this issue Dec 27, 2021 · 4 comments · Fixed by #61
Closed

Bug: false trigger on valid imports #60

AlexandrHoroshih opened this issue Dec 27, 2021 · 4 comments · Fixed by #61
Assignees
Labels
bug Something isn't working
Milestone

Comments

@AlexandrHoroshih
Copy link

AlexandrHoroshih commented Dec 27, 2021

I have an app with react, effector, patronum, antd and bunch of other stuff

After i had added @feature-sliced/eslint-config, errors like this started to appear:

  2:26  error  Reaching to "effector-react/ssr" is not allowed  import/no-internal-modules
  3:23  error  Reaching to "patronum/delay" is not allowed      import/no-internal-modules

The problem is that imports like that are perfectly valid and intended by these libraries 🤷‍♂️
I suggest not to run import/no-internal-modules rule against imports from node_modules (or against non-feature-sliced paths at all)

Small reproduce: https://stackblitz.com/edit/fs-eslint-false-trigger?file=src/app/index.js
Run npm run lint in the terminal to see the issue

@AlexandrHoroshih AlexandrHoroshih added the bug Something isn't working label Dec 27, 2021
@azinit azinit added this to the 0.1.X milestone Dec 27, 2021
@azinit
Copy link
Member

azinit commented Dec 27, 2021

Thanks for issue!

For a while you can customize your boundaries manually:

{
  "extends": [
    "@feature-sliced/eslint-config/rules/import-order",
    "@feature-sliced/eslint-config/rules/layers-slices", 
    // Related with bug =>  "@feature-sliced/eslint-config/rules/public-api",
  ]
}

@azinit
Copy link
Member

azinit commented Dec 27, 2021

@Krakazybik SLA 40 MIN, KARL! 🚀

image

@azinit
Copy link
Member

azinit commented Dec 27, 2021

@AlexandrHoroshih JFYI, I've published new patch version - 0.1.0-alpha.1

You can try to use it with this bugfix

@azinit
Copy link
Member

azinit commented Dec 27, 2021

If problem remained, reopen issue ✊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants