mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-02 14:30:41 -05:00
Merge pull request #371 from sharelatex/as-chai-eslint
Minor improvements to eslint config
This commit is contained in:
commit
bd570be565
3 changed files with 28 additions and 0 deletions
|
@ -1,9 +1,23 @@
|
||||||
{
|
{
|
||||||
"extends": ["standard"],
|
"extends": ["standard"],
|
||||||
|
"plugins": [
|
||||||
|
"chai-expect",
|
||||||
|
"chai-friendly"
|
||||||
|
],
|
||||||
"env": {
|
"env": {
|
||||||
"mocha": true
|
"mocha": true
|
||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
"expect": true
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
12
services/web/npm-shrinkwrap.json
generated
12
services/web/npm-shrinkwrap.json
generated
|
@ -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": {
|
"eslint-plugin-import": {
|
||||||
"version": "2.9.0",
|
"version": "2.9.0",
|
||||||
"from": "eslint-plugin-import@>=2.9.0 <3.0.0",
|
"from": "eslint-plugin-import@>=2.9.0 <3.0.0",
|
||||||
|
|
|
@ -102,6 +102,8 @@
|
||||||
"eslint": "^4.18.1",
|
"eslint": "^4.18.1",
|
||||||
"eslint-config-standard": "^11.0.0",
|
"eslint-config-standard": "^11.0.0",
|
||||||
"eslint-loader": "^1.9.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-import": "^2.9.0",
|
||||||
"eslint-plugin-node": "^6.0.0",
|
"eslint-plugin-node": "^6.0.0",
|
||||||
"eslint-plugin-promise": "^3.6.0",
|
"eslint-plugin-promise": "^3.6.0",
|
||||||
|
|
Loading…
Reference in a new issue