mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 20:27:56 -05:00
Merge pull request #350 from justjake/jake/eslint-sharable-conf
Create package eslint-config-airbnb
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
@@ -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",
|
||||
|
||||
11
packages/eslint-config-airbnb/index.js
Normal file
11
packages/eslint-config-airbnb/index.js
Normal 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;
|
||||
35
packages/eslint-config-airbnb/package.json
Normal file
35
packages/eslint-config-airbnb/package.json
Normal 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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user