Skip to content

Commit 02e0c72

Browse files
author
Robert Jackson
committed
Update linting setup
* Update eslint to 7.x * Move from `lint:js` to `lint` * Use `npm-run-all` instead of `&&` in scripts * Move `NODE_ENV` configuration into `.mocharc.js` (makes it so that `mocha test/some-file-test.js` works on its own)
1 parent 4b04466 commit 02e0c72

File tree

3 files changed

+418
-127
lines changed

3 files changed

+418
-127
lines changed

.mocharc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// set the NODE_ENV to test if not already set, NODE_ENV=test changes the default worker count to 1
2+
process.env.NODE_ENV = process.env.NODE_ENV || 'test';

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
"author": "Tom Dale <[email protected]>",
2020
"main": "src/fastboot-app-server.js",
2121
"scripts": {
22-
"lint:js": "eslint --cache .",
23-
"test": "yarn lint:js && NODE_ENV=test mocha"
22+
"lint": "eslint --cache .",
23+
"test": "npm-run-all lint test:*",
24+
"test:mocha": "mocha"
2425
},
2526
"dependencies": {
2627
"basic-auth": "^2.0.1",
@@ -32,10 +33,11 @@
3233
},
3334
"devDependencies": {
3435
"chai": "^4.1.0",
35-
"eslint": "^6.8.0",
36-
"eslint-plugin-mocha": "^6.3.0",
36+
"eslint": "^7.12.0",
37+
"eslint-plugin-mocha": "^8.0.0",
3738
"eslint-plugin-node": "^11.1.0",
3839
"mocha": "^8.2.0",
40+
"npm-run-all": "^4.1.5",
3941
"release-it": "^14.2.0",
4042
"release-it-lerna-changelog": "^3.0.0",
4143
"request": "^2.81.0",

0 commit comments

Comments
 (0)