generated from oracle/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(deps): bump node-react-todo template to react v19.0 and eslint v9…
… with flat config
- Loading branch information
1 parent
0e2b895
commit 0b3dfdd
Showing
3 changed files
with
82 additions
and
59 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
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 | ||
} | ||
} | ||
]; |
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