Skip to content

ESlint web fixes#5234

Open
brettedw wants to merge 1 commit intomainfrom
task/eslint-web-fix
Open

ESlint web fixes#5234
brettedw wants to merge 1 commit intomainfrom
task/eslint-web-fix

Conversation

@brettedw
Copy link
Collaborator

@brettedw brettedw commented Mar 18, 2026

This PR fixes ESLint configuration issues in web so React and TypeScript linting work

  • Fixed the web ESLint config so it is actually loaded by ESLint.
  • Migrated the config from CommonJS to ESM by renaming eslint.config.cjs to eslint.config.js.
  • Scoped the TS/React lint rules to src/**/*.{ts,tsx} so the ESLint config file itself is not linted as application code.
  • Disabled outdated React JSX scope rules for the automatic JSX runtime:
    • react/react-in-jsx-scope
    • react/jsx-uses-react

Why

The web ESLint setup had a few issues that prevented expected lint feedback:

  • the config had an invalid export/config shape
  • ESLint 9 flat config expected files to be an array
  • ESLint config no longer reports require()-style import warnings

These issues caused missing or misleading lint output in VS Code, especially for React hook warnings

Test Links:

Landing Page
MoreCast
Percentile Calculator
C-Haines
FireCalc
FireCalc bookmark
Auto Spatial Advisory (ASA)
HFI Calculator
SFMS Insights
Fire Watch

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant