Nepotistic Pontifex Maximus
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

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

install

npm i sails-hook-lint

Downloadsweekly downloads

4

version

1.1.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar