1.0.0 • Published 9 years ago

zkflow-task-eslint v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

ZKflow task eslint

Eslint task in ZKflow format

Shields

npm npm npm Travis bitHound Overall Score bitHound Dependencies bitHound Dev Dependencies bitHound Code GitHub forks GitHub stars GitHub followers

Installation

npm install --save zkflow-task-eslint zkflow gulp

Usage

gulpfile.js

require('zkflow')({
  'lint-js': {
    task: require('zkflow-task-eslint')
  }
}, require('gulp'), mode)

mode

Mode object. Determines task mode of operation.

{
  // If watch is true and eslintFix is false rerun eslint on any js file changes. Do not stop on errors.
  // If false run only once and stop on any errors
  watch: true
  // If false run only once and stop on any errors, and attempt to fix what can be fixed automatically by eslint itself
  eslintFix: true
}

Default options

{
  globs: [
    'gulpfile.js',
    'gulp/*.js',
    'gulp/**/*.js',
    'src/*.js',
    'src/**/*.js'
  ],
  globsOptions: {
    base: './'
  },
  dest: '',
  eslint: {
    rules: {
      'indent': [2, 2],
      'quotes': [2, 'single'],
      'linebreak-style': [2, 'unix'],
      'semi': [2, 'always']
    },
    env: {
      'commonjs': true,
      'browser': true,
      'jasmine': true
    },
    extends: 'eslint:recommended'
  }
}

Sponsors