mirror of
https://github.com/EDCD/coriolis-data.git
synced 2025-12-11 16:53:04 +00:00
Refactor for 2.0
This commit is contained in:
1
node_modules/eslint-json/index.js
generated
vendored
Normal file
1
node_modules/eslint-json/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = require('path').join(__dirname, 'json.js');
|
||||
12
node_modules/eslint-json/json.js
generated
vendored
Normal file
12
node_modules/eslint-json/json.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
'use strict';
|
||||
module.exports = function (results, config) {
|
||||
return JSON.stringify({
|
||||
config: config,
|
||||
results: results
|
||||
}, function (key, val) {
|
||||
// filter away the Esprima AST
|
||||
if (key !== 'node') {
|
||||
return val;
|
||||
}
|
||||
});
|
||||
};
|
||||
64
node_modules/eslint-json/package.json
generated
vendored
Normal file
64
node_modules/eslint-json/package.json
generated
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"name": "eslint-json",
|
||||
"version": "1.0.0",
|
||||
"description": "JSON formatter (reporter) for ESLint",
|
||||
"keywords": [
|
||||
"eslint",
|
||||
"formatter",
|
||||
"reporter",
|
||||
"lint",
|
||||
"validate",
|
||||
"json",
|
||||
"serialize",
|
||||
"bridge"
|
||||
],
|
||||
"license": "MIT",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "http://sindresorhus.com"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"json.js"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sindresorhus/eslint-json"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^0.7.4",
|
||||
"mocha": "*"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"gitHead": "3c61b4d65542a430f03262fe928a40fdb9c364bf",
|
||||
"bugs": {
|
||||
"url": "https://github.com/sindresorhus/eslint-json/issues"
|
||||
},
|
||||
"homepage": "https://github.com/sindresorhus/eslint-json",
|
||||
"_id": "eslint-json@1.0.0",
|
||||
"_shasum": "54fcd60504132ddfd1fcaae3f9615a52afdcfd39",
|
||||
"_from": "eslint-json@*",
|
||||
"_npmVersion": "1.4.21",
|
||||
"_npmUser": {
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
},
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "sindresorhus",
|
||||
"email": "sindresorhus@gmail.com"
|
||||
}
|
||||
],
|
||||
"dist": {
|
||||
"shasum": "54fcd60504132ddfd1fcaae3f9615a52afdcfd39",
|
||||
"tarball": "http://registry.npmjs.org/eslint-json/-/eslint-json-1.0.0.tgz"
|
||||
},
|
||||
"directories": {},
|
||||
"_resolved": "https://registry.npmjs.org/eslint-json/-/eslint-json-1.0.0.tgz"
|
||||
}
|
||||
67
node_modules/eslint-json/readme.md
generated
vendored
Normal file
67
node_modules/eslint-json/readme.md
generated
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
# eslint-json [](https://travis-ci.org/sindresorhus/eslint-json)
|
||||
|
||||
> JSON reporter for [ESLint](https://github.com/nzakas/eslint/)
|
||||
|
||||
Makes it easy to use ESLint with other tools.
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save-dev eslint-json
|
||||
```
|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
Use it with:
|
||||
|
||||
#### ESLint CLI
|
||||
|
||||
```sh
|
||||
$ eslint --format node_modules/eslint-json/json.js file.js
|
||||
```
|
||||
|
||||
#### [grunt-eslint](https://github.com/sindresorhus/grunt-eslint/)
|
||||
|
||||
```js
|
||||
grunt.initConfig({
|
||||
eslint: {
|
||||
options: {
|
||||
format: require('eslint-json')
|
||||
},
|
||||
target: ['file.js']
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-eslint');
|
||||
grunt.registerTask('default', ['eslint']);
|
||||
```
|
||||
|
||||
|
||||
## Example output
|
||||
|
||||
```json
|
||||
{
|
||||
"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](http://sindresorhus.com)
|
||||
Reference in New Issue
Block a user