Merge pull request #350 from justjake/jake/eslint-sharable-conf

Create package eslint-config-airbnb
This commit is contained in:
Jake Teton-Landis
2015-05-26 11:03:30 -07:00
4 changed files with 49 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
node_modules

View File

@@ -3,7 +3,8 @@
"version": "2.0.0",
"description": "A mostly reasonable approach to JavaScript.",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"publish-all": "npm publish && cd ./packages/eslint-config-airbnb && npm publish"
},
"repository": {
"type": "git",

View File

@@ -0,0 +1,11 @@
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;

View File

@@ -0,0 +1,35 @@
{
"name": "eslint-config-airbnb",
"version": "0.0.6",
"description": "Airbnb's ESLint config, following our styleguide",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/airbnb/javascript"
},
"keywords": [
"eslint",
"eslintconfig",
"config",
"airbnb",
"javascript",
"styleguide"
],
"author": "Jake Teton-Landis (https://twitter.com/@jitl)",
"license": "MIT",
"bugs": {
"url": "https://github.com/airbnb/javascript/issues"
},
"homepage": "https://github.com/airbnb/javascript",
"dependencies": {
"airbnb-style": "2.0.0",
"babel-eslint": "3.1.7",
"eslint": "0.21.2",
"eslint-plugin-react": "2.3.0",
"resolve": "1.1.6",
"strip-json-comments": "1.0.2"
}
}