eslint-json

2.0.0 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    3,868
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    3,868
  • 1.0.0
    3
  • 0.2.0
    1
  • 0.1.2
    1
  • 0.1.1
    1
  • 0.1.0
    1

Package Sidebar

Install

npm i eslint-json

Weekly Downloads

3,875

Version

2.0.0

License

MIT

Last publish

Collaborators

  • sindresorhus