If stylelint is installed as an implicit dependency via the yarn package manager the plugin fails with the following errors:
SublimeLinter: WARNING: stylelint deactivated, cannot locate local or global binary
SublimeLinter: ERROR: stylelint cannot locate 'stylelint'
The reason is that when installed by yarn as an implicit dependency (I have a stylelint-webpack-plugin dependency in my package.json) a stylelint link is not added to the node_modules/.bin directory (doesn't happen if it's an explicit dep or when installed with npm).
From what I see in the changes introduced by the latest commit, the plugin no longer tries using the node_modules/stylelint/dist/cli.js (like the old wrapper used to do) but instead calls a stylelint command (disclaimer: I'm not too familiar with the mechanics of the NodeLinter class and this is just my assumption based on the code in linter.py), which obviously fails due to the lack of the symbolic link.
Is there any chance to add a fallback for using the cli.js in case of a missing stylelint executable?
If stylelint is installed as an implicit dependency via the yarn package manager the plugin fails with the following errors:
The reason is that when installed by yarn as an implicit dependency (I have a
stylelint-webpack-plugin
dependency in mypackage.json
) astylelint
link is not added to thenode_modules/.bin
directory (doesn't happen if it's an explicit dep or when installed with npm).From what I see in the changes introduced by the latest commit, the plugin no longer tries using the
node_modules/stylelint/dist/cli.js
(like the old wrapper used to do) but instead calls astylelint
command (disclaimer: I'm not too familiar with the mechanics of theNodeLinter
class and this is just my assumption based on the code inlinter.py
), which obviously fails due to the lack of the symbolic link.Is there any chance to add a fallback for using the
cli.js
in case of a missingstylelint
executable?