-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop Node 14, 16 and 18 and allowing only 20.x || 22.x and updating the following dependencies: debug ^4.3.4 -> ^4.3.7 glob ^10.4.5 -> ^11.0.0 eslint ^8.57.0 -> ^9.11.1 Adding eslint-define-config and replacing .eslintrc with eslint.config.js Adding Husky ^9.1.6 and mpo-node-standards ^2.0.0 then adding ./husky/pre-push mocha ^10.7.0 -> ^10.7.3 nyc ^17.0.0 -> ^17.1.0 sinon ^18.0.0 -> ^19.0.2 sinon-test ^3.1.6 globals ^15.9.0
- Loading branch information
Showing
12 changed files
with
992 additions
and
643 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
const js = require('@eslint/js'); | ||
const globals = require('globals'); | ||
|
||
|
||
const styleRules = { | ||
quotes: ['error', 'single', { avoidEscape: true }], | ||
'no-trailing-spaces': 'error', | ||
indent: 'error', | ||
'linebreak-style': ['error', 'unix'], | ||
semi: ['error', 'always'], | ||
'brace-style': ['error', '1tbs', { allowSingleLine: true }], | ||
'keyword-spacing': 'error', | ||
'space-before-blocks': 'error', | ||
'space-before-function-paren': [ | ||
'error', | ||
{ anonymous: 'always', named: 'never' }, | ||
], | ||
'no-mixed-spaces-and-tabs': 'error', | ||
'comma-spacing': ['error', { before: false, after: true }], | ||
'key-spacing': ['error', { beforeColon: false, afterColon: true }], | ||
}; | ||
|
||
|
||
module.exports = [ | ||
js.configs.recommended, | ||
{ | ||
languageOptions: { | ||
ecmaVersion: 2022, | ||
globals: { | ||
...globals.node, | ||
} | ||
}, | ||
ignores: ['/coverage/**'], | ||
rules: { | ||
'no-unused-vars': [ | ||
'error', | ||
{ argsIgnorePattern: '^(err|req|res|next)$' }, | ||
], | ||
'one-var': ['error', { initialized: 'never' }], | ||
'no-var': 'error', | ||
...styleRules, | ||
}, | ||
}, | ||
// Unit tests | ||
{ | ||
files: ['test/**'], | ||
languageOptions: { | ||
globals: { | ||
...globals.mocha, | ||
should: 'readonly', | ||
expect: 'readonly', | ||
sinon: 'readonly', | ||
APP_ROOT: 'readonly', | ||
proxyquire: 'readonly', | ||
request: 'readonly', | ||
response: 'readonly', | ||
}, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.