Add eslint infrastructure

This commit is contained in:
Amir Jafarian 2016-04-09 14:31:22 -04:00
parent 505d219129
commit 9061026027
5 changed files with 13 additions and 27 deletions

0
.eslintignore Normal file
View File

10
.eslintrc Normal file
View File

@ -0,0 +1,10 @@
{
"extends": "loopback",
"rules": {
"max-len": ["error", 80, 4, {
"ignoreComments": true,
"ignoreUrls": true,
"ignorePattern": "^\\s*var\\s.+=\\s*(require\\s*\\()|(/)"
}]
}
}

View File

@ -1,2 +0,0 @@
node_modules/
coverage/

View File

@ -1,23 +0,0 @@
{
"node": true,
"browser": true,
"camelcase": true,
"eqnull": true,
"indent": 2,
"undef": true,
"unused": "vars",
"quotmark": "true",
"maxlen": 110,
"trailing": true,
"newcap": true,
"nonew": true,
"sub": true,
"globals": {
"describe": true,
"it": true,
"before": true,
"beforeEach": true,
"after": true,
"afterEach": true
}
}

View File

@ -13,7 +13,7 @@
}, },
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"pretest": "jshint .", "pretest": "eslint .",
"test": "mocha" "test": "mocha"
}, },
"license": "MIT", "license": "MIT",
@ -23,7 +23,8 @@
}, },
"devDependencies": { "devDependencies": {
"chai": "~2.3.0", "chai": "~2.3.0",
"jshint": "^2.7.0", "eslint": "^2.7.0",
"eslint-config-loopback": "^1.0.0",
"loopback-datasource-juggler": "^2.29.0", "loopback-datasource-juggler": "^2.29.0",
"mocha": "^2.2.5" "mocha": "^2.2.5"
} }