alexilyaev / stylelint-find-rules

Find stylelint rules that are not configured in your stylelint config.
MIT License
27 stars 4 forks source link

Cannot be used with global stylelint #17

Closed crystalfp closed 5 years ago

crystalfp commented 6 years ago

I have stylelint 9.5.0 installed globally, like eslint. I installed stylelint-find-rules global also, but it insists searching for a local stylelint.

 stylelint-find-rules --config ./stylelintrc.json ../app/css/iandp.css
C:\Users\Mario\AppData\Roaming\npm\node_modules\stylelint-find-rules\src\lib\is-deprecated.js:8
  throw err;
  ^

Error: ENOENT: no such file or directory, open 'D:\Projects\iandp\lint\node_modules\stylelint\lib\rules\at-rule-blacklist\README.md'

Is there any solution? I find non-optimal to have tools (not libraries) installed under every project I'm working on. Thanks! mario

alexilyaev commented 6 years ago

@crystalfp For now, you can easily skip the deprecated rules check using --no-d.

I'll check how I can find the package path, either local or global.

alexilyaev commented 5 years ago

This turned out to be really complicated, specifically because of Yarn.
It's actually a common practice to install tools alongside a project (when the tool depends on a lib) since different versions of tools work with different versions of libraries.

I'll be be glad to review a PR if someone is up for it.

For now, I'm going to close this one.