use multi .eslintrc.js files

This commit is contained in:
yushijinhun 2018-02-11 16:17:43 +08:00
parent 2ecffe1de4
commit 79167ab0f8
No known key found for this signature in database
GPG Key ID: 5BC167F73EA558E4
4 changed files with 12 additions and 1 deletions

View File

@ -1,4 +1,5 @@
module.exports = {
"root": true,
"env": {
"es6": true
},

View File

@ -8,7 +8,7 @@
"scripts": {
"build": "rollup -c tools/rollup.module.js && rollup -c tools/rollup.browser.js && rollup -c tools/rollup.browser.min.js",
"prepare": "npm test && rm -rf build && npm run build",
"test": "eslint --env browser src/** && eslint --env node tools/** && tslint -c tslint.json types/**.ts"
"test": "eslint src/** tools/** && tslint -c tslint.json types/**.ts"
},
"repository": {
"type": "git",

5
src/.eslintrc.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
"env": {
"browser": true
}
}

5
tools/.eslintrc.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
"env": {
"node": true
}
}