mirror of
https://github.com/EDCD/coriolis-data.git
synced 2025-12-10 07:55:33 +00:00
eslint-json 
JSON reporter for ESLint
Makes it easy to use ESLint with other tools.
Install
$ npm install --save-dev eslint-json
Getting started
Use it with:
ESLint CLI
$ eslint --format node_modules/eslint-json/json.js file.js
grunt-eslint
grunt.initConfig({
eslint: {
options: {
format: require('eslint-json')
},
target: ['file.js']
}
});
grunt.loadNpmTasks('grunt-eslint');
grunt.registerTask('default', ['eslint']);
Example output
{
"results": [
{
"filePath": "test.js",
"messages": [
{
"ruleId": "no-undef",
"severity": 2,
"message": "'require' is not defined.",
"line": 2,
"column": 13,
"source": "require"
}
]
}
]
}
License
MIT © Sindre Sorhus