stylelint-scss icon indicating copy to clipboard operation
stylelint-scss copied to clipboard

Imports blacklist

Open kirill-konshin opened this issue 4 years ago • 3 comments

It would be great to allow conditional blocking of certain imports from certain paths just like this one: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-restricted-paths.md

For example:

  • node_modules/lib
    • colors.scss
    • index.scss
  • src/app

app should not import colors.scss from lib, but can import index.scss, lib should not import anything from app.

kirill-konshin avatar Sep 16 '19 16:09 kirill-konshin

Sounds quite good, but I need to look at the eslint rule to see how it works :)

kristerkari avatar Sep 18 '19 19:09 kristerkari

I guess even simple regex with from and to would be enough. Probably it may require path resolution though.

kirill-konshin avatar Sep 18 '19 19:09 kirill-konshin

Bumping this issue as this is a really old issue. I raised the same issue in stylelint repo.

jd-solanki avatar Apr 11 '23 09:04 jd-solanki