Skip to content

Commit

Permalink
Update linting setup
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
rwjblue committed Oct 26, 2020
1 parent 4b04466 commit 02e0c72
Show file tree
Hide file tree
Showing 3 changed files with 418 additions and 127 deletions.
2 changes: 2 additions & 0 deletions .mocharc.js
@@ -0,0 +1,2 @@
// set the NODE_ENV to test if not already set, NODE_ENV=test changes the default worker count to 1
process.env.NODE_ENV = process.env.NODE_ENV || 'test';
10 changes: 6 additions & 4 deletions package.json
Expand Up @@ -19,8 +19,9 @@
"author": "Tom Dale <tom@tomdale.net>",
"main": "src/fastboot-app-server.js",
"scripts": {
"lint:js": "eslint --cache .",
"test": "yarn lint:js && NODE_ENV=test mocha"
"lint": "eslint --cache .",
"test": "npm-run-all lint test:*",
"test:mocha": "mocha"
},
"dependencies": {
"basic-auth": "^2.0.1",
Expand All @@ -32,10 +33,11 @@
},
"devDependencies": {
"chai": "^4.1.0",
"eslint": "^6.8.0",
"eslint-plugin-mocha": "^6.3.0",
"eslint": "^7.12.0",
"eslint-plugin-mocha": "^8.0.0",
"eslint-plugin-node": "^11.1.0",
"mocha": "^8.2.0",
"npm-run-all": "^4.1.5",
"release-it": "^14.2.0",
"release-it-lerna-changelog": "^3.0.0",
"request": "^2.81.0",
Expand Down

0 comments on commit 02e0c72

Please sign in to comment.