Skip to content

DrakorBofh/SublimeLinter-contrib-xo

 
 

Repository files navigation

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 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.

Settings

Also you can change general plugin setting from:

Preferences > Package Settings > SublimeLinter XO

Autofix

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
}

Tips

Using non-JS syntax

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"
		}
	}
}

Note

XO linting is only enabled for projects with xo in devDependencies/dependencies in package.json.

License

MIT © Sindre Sorhus

About

SublimeLinter plugin for XO

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.1%
  • JavaScript 0.9%