sails-hook-eslint
v1.0.3
Published
Checks you Sails code with eslint
Downloads
5
Maintainers
Readme
sails-hook-eslint
Needs at least Sails version 0.11.0 to work
Sails JS hook to activate ESLint for your whole sails app.
Installation
npm install sails-hook-eslint
Usage
Just lift your app as normal, and enjoy linting of your app. To see how to create a .eslintrc
and what is possible, see: http://eslint.org/
Configuration
By default, configuration lives in sails.config.eslint
. The configuration key (eslint
) can be changed by setting sails.config.hooks['sails-hook-eslint'].configKey
.
Parameter | Type | Details
-------------- | ------------------- |:---------------------------------
check | ((boolean)) | Whether or not sails should lint your JS code. Defaults to true
.
formatter | ((string)) | Which formatter to use. Defaults to 'stylish'.
patterns | ((array)) | Which folders or glob patterns to lint. Defaults to ['api', 'config'].
That’s it!