This linter plugin for SublimeLinter provides an interface to XO. It will be used with files that have the “JavaScript” syntax.
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 on your system:
$ npm install --global 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.
Also you can change general plugin setting from:
Preferences > Package Settings > SublimeLinter XO
Is posible run manually autofix on current file manually or after save files.
To run manually you can use the Ctrl+Alt+f
shortcut or use the menu entry Tools > SublimeLinter XO > AutoFix Current File
If you want to run this command after save your file, you can enable the autofix_on_save
option on settings:
{
"autofix_on_save": true
}
If you're using an ESLint plugin with XO that provides non-JS syntax, like TypeScript, Vue, etc, you need to change the SublimeLinter selector
setting to include the syntax scope. For Vue, that would be:
{
"linters": {
"xo": {
"selector": "text.html.vue, source.js - meta.attribute-with-value"
}
}
}
XO linting is only enabled for projects with xo
in devDependencies
/dependencies
in package.json.
MIT © Sindre Sorhus