Skip to content
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
21 changes: 0 additions & 21 deletions ui/.eslintrc.cjs

This file was deleted.

65 changes: 65 additions & 0 deletions ui/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// ESLint flat configuration.
//
// Replaces `.eslintrc.cjs`. ESLint 9 no longer reads the `.eslintrc.*` format
// and stops with "couldn't find an eslint.config.(js|mjs|cjs) file", so
// `npm run lint` fails before examining a single source file -- the lint
// script has been reporting a configuration error rather than passing.
//
// A direct translation of the previous configuration: same extends, same
// rules, same ignores, same React version. Nothing here is an opinion about
// how this project should be linted; it is the old file expressed in the
// format the installed ESLint understands.
import js from "@eslint/js";
import globals from "globals";
Comment thread
jQuinRivero marked this conversation as resolved.
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";

export default [
{ ignores: ["dist/**", "node_modules/**"] },
js.configs.recommended,
{
files: ["**/*.{js,jsx}"],
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
...globals.es2020,
},
parserOptions: {
ecmaFeatures: { jsx: true },
},
},
settings: { react: { version: "18.2" } },
plugins: {
react,
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...react.configs.recommended.rules,
// The JSX transform means React need not be in scope.
...react.configs["jsx-runtime"].rules,
...reactHooks.configs.recommended.rules,
"react/jsx-no-target-blank": "off",
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
},
{
// Node runs the test files and the build tooling, so they see Node
// globals rather than browser ones.
files: [
"**/*.test.js",
"vite.config.js",
"*.config.js",
"scripts/**/*.js",
],
languageOptions: {
globals: { ...globals.node },
},
},
];
81 changes: 71 additions & 10 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
},
"overrides": {
"brace-expansion": "^5.0.6",
"minimatch@3": {
"brace-expansion": "^1.1.18"
},
"tmp": "^0.2.6",
"shell-quote": "^1.10.0",
"form-data": "^4.0.6",
Expand All @@ -58,6 +61,7 @@
"@babel/core": "^7.29.6"
},
"devDependencies": {
"@eslint/js": "^9.39.5",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^5.0.0",
Expand All @@ -66,6 +70,7 @@
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.7",
"globals": "^14.0.0",
"vite": "^8.0.16",
"vite-plugin-env-compatible": "^2.0.1"
}
Expand Down
Loading