MiguelCastillo / Brackets-InteractiveLinter

Interactive linting for Brackets
Other
119 stars 26 forks source link

Brackets-InteractiveLinter

Brackets integration with linters such as JSHint, JSLint, ESLint, JSCS, CoffeeLint, and more! Interactive Linter runs linters as you work on your code and gives instant feedback right on your document. You can access the details of the lint report by clicking on the light bulbs on the line gutters to the right of the document, or by using the keyboard shortcut Ctrl-Shift-E on that line.

Features

Linters

A list of available linters can be found here, along with information about authoring your own plugins.

coffeescript

css

html

javascript

json

Configuration

Interactive Linter can be configured via Brackets' preferences system. For details on the brackets preferences, please take a look here.

Linter per language [run time]

You can specify which linter to run for each language independently, and changes are applied at run time. You can take a look at this sample configuration.

To specify eslint as your javascript linter, you need the follow changes to your .brackets.json.

{
    "interactive-linter.javascript": ["eslint"]
}

If you actually want to disable interactive linter javascript linting, you can set the linter language to null.

{
    "interactive-linter.javascript": null
}

You can customize other linters the same way by following the convention interactive-linter.[language]: ['linter-name']. For example, to disable linting for coffeescript you can do so with the following:

{
    "interactive-linter.javascript": ["eslint"],
    "interactive-linter.coffeescript": null
}

Delay [restart]

You can configure the delay for linting your documents. The value is specified in milliseconds, and by default it is 500. In the example below, the delay is configured to 1000 milliseconds (1 second):

{
    "interactive-linter.delay": 1000
}

JSHint/JSLint

Interactive Linter automatically loads .jshintrc and .jslintrc files in your project.

All JSHint settings that already exists inline in your JavaScript files will continue to work along side any .jshintrc/.jslintrc file.

Integration with http://linterrors.com/ to find out details about what's reported by JSHint.

Inspired by Joachim's extensions brackets-continuous-compilation.

CoffeeLint

Support for loading coffeelint.json as defined here.

Screenshots

jshint

coffeelint

Installation

Interactive Linter in available through Brackets extensions' registry.

FAQ

Can I configure default linter settings?

Can I configure the settings file the linters load?

Do you support JSX linting??

{
    "interactive-linter.javascript": ["jsx"]
}

Links

Contributors

Contact me

If you have any issues or want to just drop in a line, you can use my personal email at mailto:manchagnu@gmail.com.

License

Licensed under MIT