Skip to content

Commit

Permalink
eslint 9.0 upgrade (#924)
Browse files Browse the repository at this point in the history
Co-authored-by: Ethan Shry <ethanshry@gmail.com>
  • Loading branch information
ethanshry and Ethan Shry committed Apr 21, 2024
1 parent 08611f6 commit 6d222e4
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 50 deletions.
46 changes: 0 additions & 46 deletions .eslintrc.json

This file was deleted.

44 changes: 44 additions & 0 deletions eslint.config.js
@@ -0,0 +1,44 @@
const js = require("@eslint/js");
const globals = require("globals");

module.exports = [
js.configs.recommended,
{
languageOptions: {
globals: {
...globals.es6,
...globals.node,
...globals.jasmine,
...globals.BigInt,
},
parserOptions: {
ecmaFeatures: { globalReturn: true },
},
sourceType: "commonjs",
ecmaVersion: 2022,
},
rules: {
"no-var": "error",
"prefer-const": "error",
"prefer-arrow-callback": "error",
"no-else-return": "error",
"no-multi-spaces": "error",
"no-whitespace-before-property": "error",
camelcase: "error",
"new-cap": "error",
"no-console": "error",
"comma-dangle": "error",
"no-shadow": "error",
"object-shorthand": ["error", "properties"],
indent: [
"error",
4,
{
SwitchCase: 1,
},
],
quotes: ["error", "single"],
semi: ["error", "always"],
},
},
];
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -47,11 +47,13 @@
"spex": "3.3.0"
},
"devDependencies": {
"@eslint/js": "9.1.1",
"@types/node": "20.12.5",
"bluebird": "3.7.2",
"coveralls": "3.1.1",
"cspell": "8.6.1",
"eslint": "8.57.0",
"eslint": "9.0.0",
"globals": "15.0.0",
"istanbul": "0.4.5",
"jasmine-node": "3.0.0",
"jsdoc": "4.0.2",
Expand Down
3 changes: 0 additions & 3 deletions test/db/init.js
Expand Up @@ -8,7 +8,6 @@ const {ColorConsole} = require('../../lib/utils/color');

const header = dbHeader({
query(e) {
// eslint-disable-next-line no-console
ColorConsole.info(e.query); // print all executed queries;
},
promiseLib: promise,
Expand Down Expand Up @@ -75,11 +74,9 @@ async function getPgVersion() {
}
})
.then(() => {
// eslint-disable-next-line no-console
ColorConsole.success.bright('*** SUCCESS ***');
})
.catch(error => {
// eslint-disable-next-line no-console
ColorConsole.error.bright('FAILED:', error);
})
.finally(pgp.end);
Expand Down

0 comments on commit 6d222e4

Please sign in to comment.