webstorm-xo-eslint-bridge

6.8.0 • Public • Published

eslint bridge for xo for Webstorm

Webstorm provides real time highlighting of errors for eslint, but not xo.

This project aims to trick Webstorm into calling xo instead of eslint by mimicking a tiny portion of the eslint api.

Caveats

Tested on 2020-03-11T04:23:11.198Z with and only with

I didn't expect this tool to be so simple to hack together. If it ends up needing to be more complicated because of future changes to xo, eslint or Webstorm, I offer no guarantees of future support. PRs for additional features or support are welcome.

Setup

  1. npm install -D webstorm-xo-eslint-bridge
  2. In Webstorm, open the preferences
    1. Go to Languages & Frameworks > JavaScript > Code Quality Tools > ESLint
    2. Choose Manual ESLint configuration
    3. Choose this package as the ESLint package
    4. Click Apply

Webstorm Preferences

Development Notes

If something breaks, you'll want to dig into the Webstorm eslint plugin integration layer. On my machine, I found it here: /Applications/WebStorm.app/Contents/plugins/JavaScriptLanguage/languageService/eslint/bin/eslint-plugin.js

Webstorm appears to perform some verification of the package version, so the version number of this package is closely aligned with the eslint version.

My own usage of this bridge found a memory leak somewhere. As a work around for this leak, xo is run in a subprocess.

During development, you will need to issue pkill -f debug-name=eslint to have webstorm restart the plugin (and reload the bridge). Even still, webstorm has some timers and caches around running the linter. I found it helpful to cycle between 5 different files.

Readme

Keywords

Package Sidebar

Install

npm i webstorm-xo-eslint-bridge

Weekly Downloads

851

Version

6.8.0

License

MIT

Unpacked Size

5.33 kB

Total Files

6

Last publish

Collaborators

  • danthegoodman0