@domjtalbot/grunt-eslint
Validate files with ESLint
Last updated 4 years ago by domjtalbot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @domjtalbot/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); // npm install --save-dev load-grunt-tasks

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.

License

MIT © Sindre Sorhus

Current Tags

  • 0.0.2-beta                                ...           latest (4 years ago)

3 Versions

  • 0.0.2-beta                                ...           4 years ago
  • 0.0.1-beta                                ...           4 years ago
  • 19.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 5
Last Day 1
Last Week 3
Last Month 2
Dependencies (2)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |