You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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: