Skip to content

update to ts-eslint 7.x, eslint-plugin-import #1440

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

dynst
Copy link
Collaborator

@dynst dynst commented Jun 25, 2025

https://typescript-eslint.io/blog/announcing-typescript-eslint-v7/
https://typescript-eslint.io/blog/announcing-typescript-eslint-v6/#rule-breaking-changes

A big change upgrading from v5 is that import lints were dropped from @typescript-eslint/ 6.x and newer in favor of the official eslint plugin.

Disabling a few recommended lints in this PR, but a followup PR with code changes can turn them on again.

Real problems found:

  • xchain-bitcoincash tried to export both a Client class and the abstract class it extended, using the same name. Flagged by import/export
  • parserOptions.project was left undefined, so while tsconfig.json files were being used in the build, they were never seen by eslint at all.
  • test files aren't covered by any tsconfig.json

The test files needed their own, separate tsconfig.json added. Without one, it complains if you run this:

"lint": "eslint \"{src,__tests__}/**/*.ts\" --fix --max-warnings 0",

(And you can't add test files to the workspace's tsconfig.json, because it changes the inferred value for rootDir from src/ to ./, which changes typescript's build output from lib/index.d.ts to lib/src/index.d.ts.)

@dynst dynst force-pushed the chore/eslint-plugin-import-migration branch from ba19aad to 0d1ac45 Compare June 25, 2025 19:30
dynst added 2 commits June 25, 2025 19:31
Allow using BigNumber named export from bignumber.js (for now)
for now, allow:

 import axiosRetry from 'axios-retry'

 axiosRetry.exponentialDelay
@dynst dynst force-pushed the chore/eslint-plugin-import-migration branch from 19f21a8 to f4dfc11 Compare June 25, 2025 19:57
Two conflicting exports both named 'Client'. One was a subclass
of the other.

Found by the 'import/export' lint.
@dynst dynst marked this pull request as draft June 25, 2025 20:14
@dynst dynst force-pushed the chore/eslint-plugin-import-migration branch from c31f35c to dc9dd62 Compare June 26, 2025 00:26
@dynst dynst force-pushed the chore/eslint-plugin-import-migration branch from 141519c to b88fcba Compare June 26, 2025 01:08
@dynst dynst marked this pull request as ready for review June 26, 2025 01:11
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