Skip to content

Commit

Permalink
fix(deps): bump node-vanilla dependencies and migrated to eslint flat…
Browse files Browse the repository at this point in the history
… config
  • Loading branch information
dbtools-antcampo committed Jan 18, 2025
1 parent 91a1c7e commit 97fe07f
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 35 deletions.
3 changes: 2 additions & 1 deletion templates/app/index.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ app.use( '/api/<%= apiConfiguration %>', routes );

app.use(express.static('public'));

app.use((err, req, res) => {
// eslint-disable-next-line no-unused-vars
app.use((err, req, res, next) => {
console.log(err.message);
res.status(500).send({
errorCode: err.code,
Expand Down
25 changes: 0 additions & 25 deletions templates/node-vanilla/.eslintrc.cjs

This file was deleted.

40 changes: 40 additions & 0 deletions templates/node-vanilla/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
**
** Copyright (c) 2024, Oracle and/or its affiliates.
** All rights reserved
** Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
*/
import globals from "globals";
import js from "@eslint/js";
import nodePlugin from "eslint-plugin-n";

export default [
{
files: ["src/**/*.js"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.browser,
}
},
rules: js.configs.recommended.rules
},
{
files: ["server/**/*.js", "server/**/*.cjs"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
globals: {
...globals.node,
}
},
plugins: {
n: nodePlugin
},
rules: {
...js.configs.recommended.rules,
...nodePlugin.configs["flat/recommended-script"].rules
}
}
];
20 changes: 11 additions & 9 deletions templates/node-vanilla/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,23 @@
"scripts": {
"dev": "concurrently --names server,client --prefix-colors blue,yellow --success all --kill-others 'node ./server/index.cjs' 'vite'",
"build": "vite build",
"lint": "eslint . --ext js,jsx --report-unused-disable-directives",
"lint": "eslint --report-unused-disable-directives",
"preview": "vite preview"
},
"dependencies": {
"body-parser": "^1.20.2",
"body-parser": "^1.20.3",
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"eslint": "^9.9.1",
"express": "^4.18.2",
"dotenv": "^16.4.7",
"express": "^4.21.2",
"morgan": "^1.10.0",
"oracledb": "^6.2.0"
"oracledb": "^6.7.1"
},
"devDependencies": {
"concurrently": "^8.2.2",
"eslint-plugin-node": "^11.1.0",
"vite": "^5.0.8"
"concurrently": "^9.1.2",
"eslint": "^9.18.0",
"@eslint/js": "^9.18.0",
"eslint-plugin-n": "^17.15.1",
"globals": "15.14.0",
"vite": "^6.0.7"
}
}

0 comments on commit 97fe07f

Please sign in to comment.