We have multiple projects with various .jscsrc
files.
I'd like to use one that I defined, which is stricter than most projects.
In my case its ~/.jscsrc
.
How can I configure sublime-linter
to use that file for jscs
?
Thanks!
We have multiple projects with various .jscsrc
files.
I'd like to use one that I defined, which is stricter than most projects.
In my case its ~/.jscsrc
.
How can I configure sublime-linter
to use that file for jscs
?
Thanks!
Copyright © 2021 Jogjafile Inc.
SublimeLinter is executing
jscs
on your system. To define the path to the config file (according to the docs) forjscs
using the CLI, you'd run:jscs path[ path[...]] --config=~/.config.json
To set this for the SublimeLinter package you can use SublimeLinter's
args
setting forjscs
and set the config path. This would be in yourSublimeLinter.sublime-settings
(default or user):Or alternatively, you can just use
"args": "--config=~/.jscsrc"
.Note, from the docs:
Also, the path to the
.jscsrc
file is cached, so if you create a new.jscsrc
that should have precedence over the previous one (according to the above), you need to clear the cache for the linter to use the new.jcscrc
You can clear the cache by going to:Tools > SublimeLinter > Clear Caches
.You can also override and use default/global settings with other packages with this same approach, when applicable and if the linter supports it. Another good example is with the SublimeLinter-jshint plugin.