eslint-json
JSON formatter for ESLint
Last updated 4 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eslint-json 
SYNC missed versions from official npm registry.

eslint-json Build Status

JSON reporter for ESLint

Makes it easy to use ESLint with other tools.

Install

$ npm install --save-dev eslint-json

Usage

ESLint CLI

$ eslint --format=node_modules/eslint-json file.js

grunt-eslint

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

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

Example output

[
	{
		"filePath": "/Users/sindresorhus/dev/eslint-json/index.js",
		"messages":[
			{
				"ruleId": "no-warning-comments",
				"severity": 1,
				"message": "Unexpected 'todo' comment.",
				"line": 8,
				"column": 2,
				"nodeType": "Line",
				"source": "\t// TODO: fix this later"
			}
		],
		"errorCount": 0,
		"warningCount": 1
	}
]

License

MIT © Sindre Sorhus

Current Tags

  • 2.0.0                                ...           latest (4 years ago)

6 Versions

  • 2.0.0                                ...           4 years ago
  • 1.0.0                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.2                                ...           7 years ago
  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |