Skip to content

Commit 12e0bd4

Browse files
committed
Merge pull request airbnb#350 from justjake/jake/eslint-sharable-conf
Create package eslint-config-airbnb
2 parents 5cbb666 + c3a94c1 commit 12e0bd4

4 files changed

Lines changed: 49 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"version": "2.0.0",
44
"description": "A mostly reasonable approach to JavaScript.",
55
"scripts": {
6-
"test": "echo \"Error: no test specified\" && exit 1"
6+
"test": "echo \"Error: no test specified\" && exit 1",
7+
"publish-all": "npm publish && cd ./packages/eslint-config-airbnb && npm publish"
78
},
89
"repository": {
910
"type": "git",
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var resolve = require('resolve');
2+
var stripComments = require('strip-json-comments');
3+
var fs = require('fs');
4+
5+
// you could do this all at once if you wanted to look cool
6+
var filename = resolve.sync('airbnb-style/linters/.eslintrc');
7+
var data = fs.readFileSync(filename, {encoding: 'utf-8'});
8+
var dataWithoutComments = stripComments(data);
9+
var parsed = JSON.parse(dataWithoutComments);
10+
11+
module.exports = parsed;
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "eslint-config-airbnb",
3+
"version": "0.0.6",
4+
"description": "Airbnb's ESLint config, following our styleguide",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/airbnb/javascript"
12+
},
13+
"keywords": [
14+
"eslint",
15+
"eslintconfig",
16+
"config",
17+
"airbnb",
18+
"javascript",
19+
"styleguide"
20+
],
21+
"author": "Jake Teton-Landis (https://twitter.com/@jitl)",
22+
"license": "MIT",
23+
"bugs": {
24+
"url": "https://github.com/airbnb/javascript/issues"
25+
},
26+
"homepage": "https://github.com/airbnb/javascript",
27+
"dependencies": {
28+
"airbnb-style": "2.0.0",
29+
"babel-eslint": "3.1.7",
30+
"eslint": "0.21.2",
31+
"eslint-plugin-react": "2.3.0",
32+
"resolve": "1.1.6",
33+
"strip-json-comments": "1.0.2"
34+
}
35+
}

0 commit comments

Comments
 (0)