sails-hook-lint
v1.1.2
Published
Sails hook for code style check
Downloads
4
Readme
sails-hook-lint
Use ESlint to check sails app code.
Installation
$ npm install sails-hook-lint
Usage
Put eslint configuration in your root folder, and if not, will use the plugin's configuration as default. Then you just lift app as normal, by default, lint only run in development and local environment.
For an example of eslint configuration: .eslintrc.yml. More configuration references http://eslint.org/docs/user-guide/configuring.
Configuration
Change the default configuration by adding config/lint.js
under your sails project
module.exports.lint = {
enabled: true, // Enable lint. Defaults to `true`
format: 'stylish', // Formatter. Defaults to `stylish`
// Folders or files to lint or be ignored, support glob patterns,
// pattern that starts with '!' are ignored by linting.
src: [
'.',
'!assets/**/*.js',
'!tasks/**/*.js',
'!Gruntfile.js',
'!app.js',
'!api/responses/**/*.js'
]
};
License
MIT