SublimeLinter-contrib-xo
SublimeLinter plugin for XO
Details
Installs
- Total 2K
- Win 532
- Mac 945
- Linux 299
Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
SublimeLinter-contrib-xo
This linter plugin for SublimeLinter provides an interface to XO. It will be used with files that have the “JavaScript” syntax.
Installation
SublimeLinter must be installed in order to use this plugin.
Please use Package Control to install the linter plugin.
Before installing this plugin, you must ensure that xo
is installed in your project:
npm install xo
In order for xo
to be executed by SublimeLinter, you must ensure that its path is available to SublimeLinter. The docs cover troubleshooting PATH configuration.
Settings
Also, you can change general plugin setting from: “Preferences › Package Settings › SublimeLinter XO”.
Auto-fix
To run the auto-fixer, press the ctrl+alt+f
shortcut or use the menu entry “Tools › SublimeLinter XO › Fix current file”.
The shortcut can be changed in “Preferences › Key Bindings” by adding the following to the array:
{
"keys": [
"ctrl+alt+f"
],
"command": "xo_fix"
}
If you want to run the auto-fixer when saving a file, you can enable the fix_on_save
setting:
{
"fix_on_save": true
}
Tips
Using non-JS syntax
Typical plugins for ESLint, for example, for TypeScript or Vue, should just work automatically if they're installed locally in your project (defined in the same package.json
).
For plugins not supported out-of-the-box, you may need to change the SublimeLinter selector
setting to include the correct syntax scope. For Vue, that could be:
{
"linters": {
"xo": {
"selector": "text.html.vue, source.js - meta.attribute-with-value"
}
}
}
Help, xo
doesn't lint my HTML files anymore!
xo
will only lint *.js
files for standard, vanilla config without further plugins. Either install the eslint-plugin-html or tweak the selector
:
{
"linters": {
"xo": {
"selector": "source.js - meta.attribute-with-value"
}
}
}
Note
XO linting is only enabled for projects with xo
in devDependencies
/dependencies
in package.json.