Skip to content

Consume @itwin/eslint-plugin 6.0.0, update linting, remove a pnpm override#342

Open
hl662 wants to merge 3 commits intomainfrom
nam/eslint-bump
Open

Consume @itwin/eslint-plugin 6.0.0, update linting, remove a pnpm override#342
hl662 wants to merge 3 commits intomainfrom
nam/eslint-bump

Conversation

@hl662
Copy link
Contributor

@hl662 hl662 commented Mar 20, 2026

Follow up from #341 (comment)

Dependency upgrades:

  • Upgraded @itwin/eslint-plugin to version 6.0.0 and eslint to version 9.11.1 in packages/browser/package.json and packages/electron/package.json, ensuring all packages use the latest linting tools.
  • Remove the pnpm override for flatten, now that we don't need it

Lint rule adjustments and code style:

  • Replaced deprecated lint rule comments (deprecation/deprecation and @typescript-eslint/no-var-requires) with updated ones (@typescript-eslint/no-deprecated and @typescript-eslint/no-require-imports) throughout the codebase for improved lint compatibility.
  • Updated deprecated documentation tags to specify version numbers more clearly (e.g., @deprecated in 1.1.0.). We also have a custom lint rule in iTwin/eslint-plugin that is more strict on this
  • Improved error handling style by removing unused error variables in catch blocks, leading to cleaner and more modern code.
  • Added explicit lint disables for non-null assertions to satisfy new linting requirements.

Other minor improvements:

  • Removed an unnecessary override for flat-cache>flatted in the root package.json.
  • Minor formatting and naming convention fixes for improved readability and consistency.

These changes collectively modernize the codebase’s linting setup and ensure compatibility with the latest standards.

hl662 and others added 3 commits March 20, 2026 14:39
- Bump @itwin/eslint-plugin ^4.1.1 → ^6.0.0 and eslint ^8.57.1 → ^9.11.1 in all 5 packages
- Remove flat-cache>flatted pnpm override (no longer needed: eslint@9 brings flatted@3.4.2)
- Fix all lint errors introduced by v6 rule changes:
  - Replace deprecated 'deprecation/deprecation' disable comments with '@typescript-eslint/no-deprecated'
  - Update '@typescript-eslint/no-var-requires' disable comments to 'no-require-imports'
  - Replace unused catch bindings (err/error) with bare catch {} blocks
  - Add eslint-disable-next-line for no-non-null-assertion sites (per project policy)
  - Fix prefer-promise-reject-errors violations
  - Fix @itwin/require-version-in-deprecation: use '. ' separator, no 'x' in semver
  - Remove stale/duplicate eslint-disable comments made unnecessary by v6

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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