grunt-eslint
Validate files with ESLint
Last updated 5 months ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install grunt-eslint 
SYNC missed versions from official npm registry.

grunt-eslint Build Status

Validate files with ESLint

Install

$ npm install --save-dev grunt-eslint

Usage

require('load-grunt-tasks')(grunt);

grunt.initConfig({
	eslint: {
		target: ['file.js']
	}
});

grunt.registerTask('default', ['eslint']);

Examples

Custom config and rules

grunt.initConfig({
	eslint: {
		options: {
			configFile: 'conf/eslint.json',
			rulePaths: ['conf/rules']
		},
		target: ['file.js']
	}
});

Custom formatter

grunt.initConfig({
	eslint: {
		options: {
			format: require('eslint-tap')
		},
		target: ['file.js']
	}
});

Options

See the ESLint options.

In addition the following options are supported:

format

Type: string
Default: 'stylish'

Name of a built-in formatter or path to a custom one.

Some formatters you might find useful: eslint-json, eslint-tap.

outputFile

Type: string
Default: ''

Output the report to a file.

quiet

Type: boolean
Default: false

Report errors only.

maxWarnings

Type: number
Default: -1 (Means no limit)

Number of warnings to trigger non-zero exit code.

failOnError

Type: boolean
Default: true

Fail the build if ESLint found any errors.

Current Tags

  • 22.0.0                                ...           latest (5 months ago)

50 Versions

  • 22.0.0                                ...           5 months ago
  • 21.1.0                                ...           6 months ago
  • 21.0.0                                ...           a year ago
  • 20.2.0                                ...           2 years ago
  • 20.1.0                                ...           2 years ago
  • 20.0.0                                ...           2 years ago
  • 19.0.0                                ...           3 years ago
  • 18.1.0                                ...           4 years ago
  • 18.0.0                                ...           4 years ago
  • 17.3.2                                ...           4 years ago
  • 17.3.1                                ...           4 years ago
  • 17.3.0                                ...           4 years ago
  • 17.2.0                                ...           4 years ago
  • 17.1.0                                ...           4 years ago
  • 17.0.0                                ...           4 years ago
  • 16.0.0                                ...           4 years ago
  • 15.0.0                                ...           4 years ago
  • 14.0.0                                ...           5 years ago
  • 13.0.0                                ...           5 years ago
  • 12.0.0                                ...           5 years ago
  • 11.0.0                                ...           5 years ago
  • 10.0.0                                ...           5 years ago
  • 9.0.0                                ...           5 years ago
  • 8.0.0                                ...           5 years ago
  • 7.0.1                                ...           5 years ago
  • 7.0.0                                ...           5 years ago
  • 6.0.0                                ...           5 years ago
  • 5.2.0                                ...           5 years ago
  • 5.1.0                                ...           5 years ago
  • 5.0.0                                ...           5 years ago
  • 4.0.0                                ...           5 years ago
  • 3.0.0                                ...           5 years ago
  • 2.1.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.2                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.6.0                                ...           5 years ago
  • 0.5.0                                ...           6 years ago
  • 0.4.0                                ...           6 years ago
  • 0.3.2                                ...           6 years ago
  • 0.3.1                                ...           6 years ago
  • 0.3.0                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 850
This Month 2,884
Last Day 262
Last Week 2,028
Last Month 3,125
Dependencies (2)
Dev Dependencies (3)
Dependents (117)

Copyright 2014 - 2016 © taobao.org |