Merge pull request #371 from sharelatex/as-chai-eslint

Minor improvements to eslint config
This commit is contained in:
Alasdair Smith 2018-03-01 15:03:12 +00:00 committed by GitHub
commit bd570be565
3 changed files with 28 additions and 0 deletions

View file

@ -1,9 +1,23 @@
{
"extends": ["standard"],
"plugins": [
"chai-expect",
"chai-friendly"
],
"env": {
"mocha": true
},
"globals": {
"expect": true
},
"rules": {
"max-len": "error",
// Add some chai specific rules
"chai-expect/missing-assertion": "error",
"chai-expect/terminating-properties": "error",
// Swap the no-unused-expressions rule with a more chai-friendly one
"no-unused-expressions": 0,
"chai-friendly/no-unused-expressions": "error"
}
}

View file

@ -2981,6 +2981,18 @@
}
}
},
"eslint-plugin-chai-expect": {
"version": "1.1.1",
"from": "eslint-plugin-chai-expect@latest",
"resolved": "https://registry.npmjs.org/eslint-plugin-chai-expect/-/eslint-plugin-chai-expect-1.1.1.tgz",
"dev": true
},
"eslint-plugin-chai-friendly": {
"version": "0.4.1",
"from": "eslint-plugin-chai-friendly@latest",
"resolved": "https://registry.npmjs.org/eslint-plugin-chai-friendly/-/eslint-plugin-chai-friendly-0.4.1.tgz",
"dev": true
},
"eslint-plugin-import": {
"version": "2.9.0",
"from": "eslint-plugin-import@>=2.9.0 <3.0.0",

View file

@ -102,6 +102,8 @@
"eslint": "^4.18.1",
"eslint-config-standard": "^11.0.0",
"eslint-loader": "^1.9.0",
"eslint-plugin-chai-expect": "^1.1.1",
"eslint-plugin-chai-friendly": "^0.4.1",
"eslint-plugin-import": "^2.9.0",
"eslint-plugin-node": "^6.0.0",
"eslint-plugin-promise": "^3.6.0",