3.6.0 • Published 8 years ago

boiler-config-eslint v3.6.0

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

eslint-config

Configuration for JavaScript code linting.

Gulp

  • must be used with gulp-eslint@2
import eslintConfig from 'eslint-config';
import formatter from 'eslint-friendly-formatter';

gulp.task('lint', () => {
  const lintConfig = eslintConfig({
    isDev: true,
    lintEnv: 'build'
  });

  return gulp.src(src)
    .pipe(eslint(lintConfig))
    .pipe(eslint.format(formatter));
});

Webpack

import eslintConfig from 'eslint-config';

const {rules, configFile} = eslintConfig({/*options*/});

export default {
  entry: //
  output: //
  eslint: {
    rules,
    configFile,
    formatter,
    emitError: false,
    emitWarning: false,
    failOnWarning: !isDev,
    failOnError: !isDev
  }
}

API

eslint(options)

options.isDev

Type: Boolean

Allows debugger and console as well as being lighter on other rules

options.basic

Type: Boolean

Only applies a small subset of rules

options.lintEnv

Type: String 'build', 'web', 'test'

Changes rules per env

options.react

Type: Boolean

Add rules for React/JSX

options.generate

Type: Boolean

Generate a .eslintrc in your project root

3.6.0

8 years ago

4.4.3

8 years ago

5.2.4

8 years ago

3.5.2

8 years ago

4.4.2

8 years ago

5.2.2

8 years ago

4.4.1

8 years ago

3.5.0

8 years ago

4.4.0

8 years ago

5.1.5

8 years ago

5.1.4

8 years ago

4.3.1

8 years ago

3.4.5

8 years ago

5.1.2

8 years ago

5.0.0

8 years ago

4.3.0

8 years ago

4.2.0

8 years ago

3.4.4

8 years ago

4.0.2

8 years ago

3.4.3

8 years ago

3.4.0

8 years ago

3.3.1

8 years ago

3.3.0

8 years ago

3.0.9

8 years ago

3.0.8

8 years ago

3.0.4

8 years ago

1.1.43

8 years ago

3.0.3

8 years ago

3.0.2

8 years ago

2.1.2

8 years ago

3.0.0

8 years ago

2.1.0

8 years ago

2.0.6

8 years ago

1.1.42

8 years ago

2.0.2

8 years ago

1.0.1

8 years ago

0.5.6

8 years ago

0.5.5

8 years ago

0.5.4

8 years ago

0.2.0

8 years ago