chore(eslint): remove unused eslint-plugin-chai-friendly config - #27879
Conversation
The chai-friendly ESLint plugin tolerates chai assertion expressions like `expect(foo).to.be.true` from being flagged by no-unused-expressions. The repo does not use chai (only jest/vitest with `.toBe(...)`), so this config was dead code. The plugin also did not cover @typescript-eslint/no-unused-expressions as the inline comment noted.
b2e169b to
a4736d1
Compare
|
✅ Previously successful run of [Test] PR Suite Web e2e tests workflow has been found. |
|
✅ Previously successful run of [Test] PR Suite Desktop e2e tests workflow has been found. |
|
I only hope that changes to the eslint package invalidate nx cache so the entire lint:js suite runs over all packages. Is my assumption correct @copilot ? |
Yes — for linting, that assumption is correct. |
There was a problem hiding this comment.
Pull request overview
Removes the unused Chai-specific ESLint override from the shared @trezor/eslint config package, along with its dependency and lockfile entry, since the repo does not use Chai assertions.
Changes:
- Deleted the
chaiFriendlyConfigflat-config module and stopped including it in the exported ESLint config array. - Removed
eslint-plugin-chai-friendlyfrom@trezor/eslintdevDependencies. - Cleaned up related references in the dependency list script and
yarn.lock.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Removes the eslint-plugin-chai-friendly lock entry after dedupe. |
| scripts/list-outdated-dependencies/foundation-dependencies.txt | Drops eslint-plugin-chai-friendly from the tracked foundation deps list. |
| packages/eslint/src/index.mjs | Removes import/spread of chaiFriendlyConfig from the exported flat config. |
| packages/eslint/src/chaiFriendlyConfig.mjs | Deletes the unused Chai-friendly rule override module. |
| packages/eslint/package.json | Removes eslint-plugin-chai-friendly from devDependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
LGTM, indeed chai seems to be unused for a long time.
And eslint is passing (in the first run it ran all workspaces)
Summary
Stumbled upon this while browsing the repo:
packages/eslint/src/chaiFriendlyConfig.mjsis dead code.The
eslint-plugin-chai-friendlyplugin exists to stopno-unused-expressionsfrom flagging chai assertions likeexpect(foo).to.be.true. The repo does not usechaianywhere — tests are jest/vitest with.toBe(...)/.toEqual(...). The only occurrence ofchaiin the tree is a transitive entry inyarn.lock.The inline comment in the file even acknowledged the override does not cover
@typescript-eslint/no-unused-expressions, so even hypothetically it would not have helped.Changes:
packages/eslint/src/chaiFriendlyConfig.mjspackages/eslint/src/index.mjseslint-plugin-chai-friendlyfrompackages/eslint/package.jsonyarn dedupe— lockfile diff included (only the plugin entry is removed)Test plan
yarn workspace @trezor/eslint type-checkpasses🤖 LLM Test Recommendations
Summary: The only changed file is packages/eslint/package.json, which is a development-time ESLint configuration package. This change affects linting tooling only and has no impact on runtime application behavior, UI components, or any user-facing functionality. There is no static test coverage mapping, and no E2E test — including the Connect popup webextension test — exercises or depends on ESLint configuration. No E2E tests need to be run for this change.
Changed files (1)
packages/eslint/package.jsonNo test recommendations found.
packages/eslint/package.jsonUpdated: 2026-05-20T09:38:15.615Z
🔍 Currents Test Results
🔍 Suite desktop test results: View in Currents
🔍 Suite web test results: View in Currents
🌐 Preview deployments
🌐 Suite Web preview: https://dev.suite.sldev.cz/suite-web/mroz22/check-chai-friendly-config/web/
🔒 Quarantined E2E Tests
Trezor Suite (web) — 4 test(s)
Updated: 2026-05-20T09:43:34.350Z • 4 test(s) total
Trezor Suite (desktop) — 2 test(s)
Updated: 2026-05-20T09:41:58.102Z • 2 test(s) total