Skip to content

Commit

Permalink
fix(deps): bump node-react-todo template to react v19.0 and eslint v9…
Browse files Browse the repository at this point in the history
… with flat config
  • Loading branch information
dbtools-antcampo committed Jan 17, 2025
1 parent 0e2b895 commit 0b3dfdd
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 59 deletions.
41 changes: 0 additions & 41 deletions templates/node-react-todo/.eslintrc.cjs

This file was deleted.

62 changes: 62 additions & 0 deletions templates/node-react-todo/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
**
** 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";
import reactPlugin from "eslint-plugin-react";
import reactHooksPlugin from "eslint-plugin-react-hooks";
import reactRefreshPlugin from "eslint-plugin-react-refresh";

export default [
{
files: ["src/**/*.js","src/**/*.jsx"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "module",
parserOptions: {
ecmaFeatures: {
jsx: true
}
},
globals: {
...globals.browser,
}
},
plugins: {
react: reactPlugin,
"react-hooks": reactHooksPlugin,
"react-refresh": reactRefreshPlugin
},
settings: {
react: { version: 'detect' }
},
rules: {
...js.configs.recommended.rules,
...reactPlugin.configs.flat.recommended.rules,
...reactPlugin.configs.flat["jsx-runtime"].rules,
...reactHooksPlugin.configs.recommended.rules,
...reactRefreshPlugin.configs.vite.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
}
}
];
38 changes: 20 additions & 18 deletions templates/node-react-todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,32 @@
"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",
"express": "^4.18.2",
"dotenv": "^16.4.7",
"express": "^4.21.2",
"morgan": "^1.10.0",
"oracledb": "^6.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-toastify": "^9.1.3"
"oracledb": "^6.7.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-toastify": "^11.0.3"
},
"devDependencies": {
"@types/react": "^18.2.43",
"@types/react-dom": "^18.2.17",
"@vitejs/plugin-react": "^4.2.1",
"concurrently": "^8.2.2",
"eslint": "^8.55.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-react": "^7.34.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"vite": "^5.0.8"
"@types/react": "^19.0.7",
"@types/react-dom": "^19.0.3",
"@vitejs/plugin-react": "^4.3.4",
"concurrently": "^9.1.2",
"eslint": "^9.18.0",
"@eslint/js": "^9.18.0",
"eslint-plugin-n": "^17.15.1",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.18",
"globals": "15.14.0",
"vite": "^6.0.7"
}
}

0 comments on commit 0b3dfdd

Please sign in to comment.