23.0.0 • Published 17 days ago

grunt-eslint v23.0.0

Weekly downloads
101,128
License
MIT
Repository
github
Last release
17 days ago

grunt-eslint Build Status

Validate files with ESLint

npm.io

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.

23.0.0

17 days ago

22.0.0

11 months ago

21.1.0

12 months ago

21.0.0

2 years ago

20.2.0

2 years ago

20.1.0

3 years ago

20.0.0

3 years ago

19.0.0

4 years ago

18.1.0

4 years ago

18.0.0

4 years ago

17.3.2

4 years ago

17.3.1

5 years ago

17.3.0

5 years ago

17.2.0

5 years ago

17.1.0

5 years ago

17.0.0

5 years ago

16.0.0

5 years ago

15.0.0

5 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

6 years ago

2.0.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.6.0

6 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

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.1

7 years ago