Repository navigation
chore(quantic): migrate to ESLint 9 flat config KIT-282 - #8770
alexprudhomme wants to merge 1 commit into
Conversation
Replace the Quantic .eslintrc.json files with an ESLint 9 flat config, bump @salesforce/eslint-config-lwc to 4.1.2, and hold eslint <10 and @salesforce/sfdx-lwc-jest <7.6.0 in Renovate.
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
|
Tip All tests passed and all changes approved!🟢 UI Tests: 440 tests unchanged |
|
Tip All tests passed and all changes approved!🟢 UI Tests: 440 tests unchanged |
@coveo/atomic
@coveo/atomic-hosted-page
@coveo/atomic-legacy
@coveo/atomic-react
@coveo/bueno
coveo.analytics
@coveo/create-atomic-rollup-plugin
@coveo/headless
@coveo/headless-react
@coveo/quantic
@coveo/relay
@coveo/shopify
@coveo/atomic-angular
commit: |
|
Superseded: the fix is now pushed on top of #8459 instead of a separate PR. |
Jira
https://coveord.atlassian.net/browse/KIT-282
Motivation
Renovate PR #8459 (Quantic-only majors) fails because Quantic still uses
.eslintrc.json, which ESLint 9+ no longer reads. ESLint 10 can't be used yet: the LWC lint stack (@salesforce/eslint-config-lwc4.1.2,@lwc/eslint-plugin-lwc,@salesforce/eslint-plugin-lightning,@babel/eslint-parser) only supports ESLint 9. Also,@salesforce/sfdx-lwc-jest7.6.0 and later pull in@lwc/state, which has a non-OSS license, so Dependency Review fails.Changes
.eslintrc.jsonfiles with onepackages/quantic/eslint.config.jsflat config. It keeps the same per-folder globals, overrides, ignores, Prettier config and TypeScript parser fore2e/*.ts.eslint8.57 → 9.39 and@salesforce/eslint-config-lwc3.7.2 → 4.1.2.no-unused-varswithcaughtErrors: 'none',requireas a global in__tests__, andreportUnusedDisableDirectives: 'off'.quanticResultsPerPage.js: add an inlineno-constant-binary-expressionexception with a TODO. The new rule found a real latent bug:Number(this.initialChoice) ?? this.choices[0]never falls back, becauseNumber()never returns null or undefined. Runtime behavior is unchanged here; the fix belongs in a follow-up PR, which should also remove the exception.renovate.json5: keepeslintbelow 10 inpackages/quanticuntil@salesforce/eslint-config-lwcsupports it, and keep@salesforce/sfdx-lwc-jestbelow 7.6.0.turbo.jsonlint inputs andAGENTS.md.The other bumps in #8459 (Babel 8, jest-junit 17, dotenv 18) are left to Renovate.
Validation
pnpm install --frozen-lockfilepasses.pnpm exec turbo run //#lint:check:all @coveo/quantic#lint:check:all --forcepasses (ESLint, Prettier, cspell, oxlint, oxfmt).ESLint lints the same files as before: 264
.jsfiles and 108e2e/*.tsfiles (checked againstfind). A temporary file with an unused variable and an undefined call reports both errors.pnpm --filter @coveo/quantic test:unit: 88 suites and 1229 tests pass.renovate-config-validator --strict renovate.json5passes.All existing tests pass without modification
No new features or bug fixes are included in this PR
Public API surface is unchanged
Checklist
chore(<scope>): <description>)🤖 Generated with Claude Code