NomicFoundation / hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
https://hardhat.org
Other
7k stars 1.35k forks source link

New only-hardhat-error rule #5461

Closed alcuadrado closed 4 days ago

alcuadrado commented 5 days ago

This PR introduces a no-restricted-syntax rule that forbids throwing any error except for:

We could later improve this with a custom rule to:

I believe that no-restricted-syntax isn't expressive enough for these things, as they are semantic conditions and not entirely syntactic. Still, I think this is a good trade-off.

PS: This depends on #5460 just for convenience and to avoid merge conflicts.

changeset-bot[bot] commented 5 days ago

🦋 Changeset detected

Latest commit: b142e0d3577dfd80e6a246b08f42ed3ebef70509

The changes in this PR will be included in the next version bump.

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

Not sure what this means? Click here to learn what changesets are.

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

vercel[bot] commented 5 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 29, 2024 11:01pm