fix(ui): make npm run lint actually run - #108
Open
Joaquín Rivero (jQuinRivero) wants to merge 1 commit into
Open
fix(ui): make npm run lint actually run#108Joaquín Rivero (jQuinRivero) wants to merge 1 commit into
Joaquín Rivero (jQuinRivero) wants to merge 1 commit into
Conversation
`npm run lint` has not linted anything since ESLint was raised to 9.
Two independent breakages, both of which stop it before it reads a source
file.
ESLint 9 no longer reads `.eslintrc.*`. It exits with "couldn't find an
eslint.config.(js|mjs|cjs) file", so the script reports a configuration
error rather than a lint result. The configuration is translated to the flat
format here -- same extends, same rules, same ignores, same React version.
Nothing about how the project is linted changes.
With that fixed it still fails, further in: `TypeError: expand is not a
function`. The `brace-expansion` override pins ^5 everywhere, and
`minimatch@3` -- which ESLint and eslint-plugin-react both depend on --
calls it as a function, while v5 exports a namespace. Scoping the override
so minimatch 3.x resolves 1.1.18 keeps the ReDoS fix the override was raised
for and restores the call shape minimatch expects. Everything else stays on
v5.
Lint now runs, and reports 253 pre-existing errors. They are left alone
deliberately: most come from rules that eslint-plugin-react-hooks 7
introduced (`immutability`, `set-state-in-effect`, `purity`), and the
largest group flags `Component.propTypes = {}` written inside the component
body -- a convention used in 72 files here. Fixing those is a decision about
the codebase, not part of repairing the tooling, and bundling them would
bury this change.
Note that `lint` runs with `--max-warnings 0`, so it will fail until those
are addressed. It was already failing, with a less informative message.
Marcelo (madpsys)
approved these changes
Aug 7, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Restores ESLint 9 lint execution for the React UI.
Changes:
- Migrates ESLint configuration to flat config.
- Adds a scoped
brace-expansioncompatibility override forminimatch@3.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
ui/.eslintrc.cjs |
Removes obsolete legacy configuration. |
ui/eslint.config.js |
Adds ESLint 9 flat configuration. |
ui/package.json |
Adds the scoped dependency override. |
ui/package-lock.json |
Locks the compatible dependency tree. |
Files not reviewed (1)
- ui/package-lock.json: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+12
to
+13
| import js from "@eslint/js"; | ||
| import globals from "globals"; |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
npm run linthas not linted anything since ESLint was raised to 9. There are two independent breakages, and both stop it before it reads a single source file.1. Config format. ESLint 9 no longer reads
.eslintrc.*:So the script has been reporting a configuration error rather than a lint result. This translates the existing config to the flat format — same
extends, same rules, same ignores, same React version. Nothing about how the project is linted changes.2. A broken dependency resolution. With the config fixed it still fails, further in:
The
brace-expansionoverride pins^5everywhere.minimatch@3— depended on by botheslintandeslint-plugin-react— calls it as a function, while v5 exports a namespace. Scoping the override sominimatch@3resolves1.1.18keeps the ReDoS fix the override was raised for and restores the call shape minimatch expects. Everything else stays on v5, andnpm auditstill reports no advisory for it.After this
Lint runs, and reports 253 pre-existing errors. They are deliberately left alone.
Most come from rules that
eslint-plugin-react-hooks7 introduced (immutability,set-state-in-effect,purity). The largest single group flagsComponent.propTypes = {}written inside the component body — a convention used in 72 files in this repository. Fixing those is a decision about the codebase rather than part of repairing the tooling, and bundling them would bury this change.Worth knowing:
lintruns with--max-warnings 0, so it will fail until those are addressed. It was already failing, with a far less informative message.Verification
npm ci && npm run lint— runs, and reports lint results rather than a config errornpm run build— unaffectednode --test src/Components/Home/ongoingJobs.test.js— 3 passed