hardhat icon indicating copy to clipboard operation
hardhat copied to clipboard

advanced-ts: fix eslint plugin breaking ts imports

Open the-vampiire opened this issue 2 years ago • 5 comments

  • [ ] Because this PR includes a bug fix, relevant tests have been included.
  • [ ] Because this PR includes a new feature, the change was previously discussed on an Issue or with someone from the team.
  • [x] I didn't do anything of this.

fixes https://github.com/NomicFoundation/hardhat/issues/2266

in the typescript starter it is using plugin:node/recommended for eslint which breaks every import done across files (see linked issue). this is strange considering typescript projects are already installing the ts-eslint rules.

some in the thread suggested removing the rules entirely but i have found that replacing them with the @typescript-eslint/recommended is a drop-in replacement.

the-vampiire avatar Apr 22 '22 21:04 the-vampiire

⚠️ No Changeset found

Latest commit: 64f478fcd9a77ba2290bc93ea7f605a1eefe0f92

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Apr 22 '22 21:04 changeset-bot[bot]

in addition i recommend adding https://www.npmjs.com/package/eslint-plugin-chai-friendly

this will prevent the "no unused expressions" for things like .to.be.true

the-vampiire avatar May 11 '22 15:05 the-vampiire

This PR was marked as stale because it didn't have any activity in the last 30 days. Please excuse us if we didn't have enough time to review it and get it merged. If you are still interested in getting these changes applied, please leave a comment indicating so. Otherwise, it will be closed in 7 days.

github-actions[bot] avatar Jun 10 '22 15:06 github-actions[bot]

i still think this is worth considering. easy PR to merge - only changes a dev dep. improves devx

the-vampiire avatar Jun 11 '22 22:06 the-vampiire

This PR was marked as stale because it didn't have any activity in the last 30 days. Please excuse us if we didn't have enough time to review it and get it merged. If you are still interested in getting these changes applied, please leave a comment indicating so. Otherwise, it will be closed in 7 days.

github-actions[bot] avatar Aug 02 '22 21:08 github-actions[bot]

Hey @the-vampiire, since you sent this PR we've changed our sample projects. They no longer include an eslint config, that's why there are merge conflicts here.

Since no having eslint anymore makes the problem pointed by you no longer relevant, I'm going to close this PR. Thanks a lot for sending it and sorry for not responding sooner!

fvictorio avatar Sep 28 '22 10:09 fvictorio