mirror of
https://github.com/airbnb/javascript.git
synced 2026-04-25 03:00:19 -04:00
manually load commented JSON
This commit is contained in:
@@ -1 +1,11 @@
|
||||
module.exports = require('airbnb-style/linters/.eslintrc');
|
||||
var resolve = require('resolve');
|
||||
var stripComments = require('strip-json-comments');
|
||||
var fs = require('fs');
|
||||
|
||||
// you could do this all at once if you wanted to look cool
|
||||
var filename = resolve.sync('airbnb-style/linters/.eslintrc');
|
||||
var data = fs.readFileSync(filename, {encoding: 'utf-8'});
|
||||
var dataWithoutComments = stripComments(data);
|
||||
var parsed = JSON.parse(dataWithoutComments);
|
||||
|
||||
module.exports = parsed;
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
"airbnb-style": "2.0.0",
|
||||
"babel-eslint": "3.1.7",
|
||||
"eslint": "0.21.2",
|
||||
"eslint-plugin-react": "2.3.0"
|
||||
"eslint-plugin-react": "2.3.0",
|
||||
"resolve": "1.1.6",
|
||||
"strip-json-comments": "1.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user