Add ESLint for this project

This commit is contained in:
YFdyh000
2017-07-09 04:09:01 +08:00
parent 5916a3de93
commit af3e105a41
2 changed files with 37 additions and 0 deletions

22
.eslintrc.json Normal file
View File

@@ -0,0 +1,22 @@
{
"root": true,
"parserOptions": {
"ecmaVersion": 6
},
"env": {
"browser": true,
"es6": true,
"webextensions": true
},
"extends": [
"eslint:recommended"
],
"rules": {
"no-console": 0,
"no-unused-vars": ["warn", { "vars": "all", "args": "all" } ],
"no-undef": ["warn"],
"no-proto": ["error"],
"prefer-arrow-callback": ["warn"],
"prefer-spread": ["warn"]
}
}

15
package.json Normal file
View File

@@ -0,0 +1,15 @@
{
"name": "webextensions-examples",
"version": "1.0.0",
"description": "",
"devDependencies": {
"eslint": "^3.19.0"
},
"scripts": {
"lint": "eslint ."
},
"license": "MIT",
"dependencies": {
"babel-eslint": "^7.2.3"
}
}