25.0.0 • Published 13 days ago

grunt-eslint v25.0.0

Weekly downloads
91,933
License
MIT
Repository
github
Last release
13 days ago

grunt-eslint

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

const noAlertRule = require('./conf/rules/no-alert');

grunt.initConfig({
	eslint: {
		options: {
			overrideConfigFile: 'conf/eslint.js',
			plugins: {
				noAlertRule
			}
		},
		target: ['file.js']
	}
});

Custom formatter

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

Options

See the ESLint options.

In addition the following options are supported:

format

Type: string\ Default: 'stylish'

The 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)

The nmber of warnings to trigger non-zero exit code.

failOnError

Type: boolean\ Default: true

Fail the build if ESLint found any errors.

25.0.0

13 days ago

24.3.0

10 months ago

24.2.0

10 months ago

24.1.0

12 months ago

24.0.1

1 year ago

24.0.0

3 years ago

23.0.0

4 years ago

22.0.0

5 years ago

21.1.0

5 years ago

21.0.0

6 years ago

20.2.0

6 years ago

20.1.0

7 years ago

20.0.0

7 years ago

19.0.0

8 years ago

18.1.0

8 years ago

18.0.0

8 years ago

17.3.2

8 years ago

17.3.1

9 years ago

17.3.0

9 years ago

17.2.0

9 years ago

17.1.0

9 years ago

17.0.0

9 years ago

16.0.0

9 years ago

15.0.0

9 years ago

14.0.0

9 years ago

13.0.0

9 years ago

12.0.0

9 years ago

11.0.0

9 years ago

10.0.0

9 years ago

9.0.0

9 years ago

8.0.0

9 years ago

7.0.1

9 years ago

7.0.0

9 years ago

6.0.0

9 years ago

5.2.0

9 years ago

5.1.0

9 years ago

5.0.0

9 years ago

4.0.0

9 years ago

3.0.0

9 years ago

2.1.0

9 years ago

2.0.0

9 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago

0.6.0

10 years ago

0.5.0

10 years ago

0.4.0

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

11 years ago

0.1.0

11 years ago

0.0.1

11 years ago