sails-hook-lint

1.1.2 • Public • Published

sails-hook-lint

NPM version Build status Test coverage Downloads

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

Readme

Keywords

Package Sidebar

Install

npm i sails-hook-lint

Weekly Downloads

0

Version

1.1.2

License

MIT

Last publish

Collaborators

  • wenjunxiao