>> Home / tutorial / software-tools
∵ Mari-chan ∴ 2021-03-15 ∞ 3'
Make sure your npm environment is clean, a.k.a if you tried to do many things before finding this, make sure to remove everything because I can assure you of this: you will have dependency errors. Also, make sure you're running an updated version of NodeJS.
eslint
as a local dependency.npm install eslint
This will fetch the latest version of eslint
and add it to your package.json
file.
npm install stylelint_d
When the plugin list appears, type stylelint_d. Among the entries you should see SublimeLinter-contrib-stylelint_d. If that entry is not highlighted, use the keyboard or mouse to select it.
eslint --init
and configure it as you like.
You should be able to run this automatically. Personally, I have to bring it up the Sublime-eslint console thing with (ctrl+alt+E) on my linux.
Make sure the plugins are installed locally colocated to eslint itself. T.i., technically, both eslint and its plugins are described in the very same package.json.
In order for stylelint_d to be executed by SublimeLinter, you must ensure that its path is available to SublimeLinter. Before going any further, please read and follow the steps in “Finding a linter executable” through “Validating your PATH” in the documentation.
Once you have installed and configured stylelint_d, you can proceed to install the SublimeLinter-contrib-stylelint_d plugin if it is not yet installed.
Part of this text was cced from the following repos:
https://github.com/SublimeLinter/SublimeLinter-eslint
https://github.com/jo-sm/SublimeLinter-contrib-stylelint_d
https://github.com/eslint/eslint#configuration
They might be useful to you if you fell into a non described pitfall.