cl1ck / c9.ide.language.javascript.eslintd

An ESLint plugin for Cloud9 IDE that makes use of eslint_d for lightening fast full featured javascript linting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

c9.ide.language.javascript.eslintd

An ESLint plugin for Cloud9 IDE that makes use of eslint_d for lightening fast full featured javascript linting.

The default linter in Cloud9 IDE uses a browser copy of eslint that does not support parsers or plug-ins in the way you might expect and does not work with the likes of the popular airbnb config. This plug-in uses eslint_d to eliminate the node.js startup time along with the netcat abilities to lint your code in ~100ms on the Cloud9 server using the standard eslint cli for full feature support.

Installation

Install the plug-in by adding it to your plug-in directory by running the following commands from the IDE terminal.

$ mkdir -p ~/.c9/plugins
$ cd ~/.c9/plugins
$ git clone https://github.com/michaelmitchell/c9.ide.language.javascript.eslintd.git

This plug-in expects eslint_d to be installed in ~/.c9/node_modules. Run the following commands in the IDE terminal to install it in the right place.

$ cd ~/.c9
$ npm install eslint_d

Load the plug-in from your Init Script from Cloud9 > Open Your Init Script menu inside of the IDE. Take a look at the SDK docs for more details.

// You can access plugins via the 'services' global variable
/*global services, plugin*/

// to load plugins use
// services.pluginManager.loadPackage([
//     "https://<user>.github.io/<project>/build/package.<name>.js",
//     "~/.c9/plugins/<name>/package.json",
// ]);

services.pluginManager.loadPackage([
    "~/.c9/plugins/c9.ide.language.javascript.eslintd/package.json"
]);

Usage

The plug-in starts eslint_d when the IDE loads but can take a couple of seconds to initialize, after it is running you should see the correct linting errors according to your .eslintrc as if you were to run it from the command line, proceeding changes to editor markers should be reflected quickly as you change your code.

The plugin will not function if no .eslintrc is present so be sure to add one even if it is blank.

License

MIT


Donate

About

An ESLint plugin for Cloud9 IDE that makes use of eslint_d for lightening fast full featured javascript linting

License:MIT License


Languages

Language:JavaScript 100.0%