Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint 9.0 upgrade #924

Merged
merged 1 commit into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions .eslintrc.json

This file was deleted.

44 changes: 44 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading