Update .gitignore files in the sample projects#8143
Merged
ChristopherDedominici merged 3 commits intomainfrom Apr 16, 2026
Merged
Update .gitignore files in the sample projects#8143ChristopherDedominici merged 3 commits intomainfrom
ChristopherDedominici merged 3 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 32884c6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Hardhat 3 sample project template ignore rules so generated projects don’t accidentally commit sensitive env files or artifacts produced by builtin coverage/snapshot tooling (Fixes #8126).
Changes:
- Ignore
.envand.env.*files while allowing.env.example. - Ignore gas snapshot output (
.gas-snapshot) and snapshot-cheatcodes output (/snapshots). - Keep existing coverage output ignore (
/coverage) while adding the missing snapshot-related ignores.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/hardhat/templates/hardhat-3/03-minimal/gitignore | Adds env + gas snapshot + snapshot-cheatcodes ignores to the minimal Hardhat 3 template. |
| packages/hardhat/templates/hardhat-3/02-mocha-ethers/gitignore | Adds env + gas snapshot + snapshot-cheatcodes ignores to the mocha+ethers Hardhat 3 template. |
| packages/hardhat/templates/hardhat-3/01-node-test-runner-viem/gitignore | Adds env + gas snapshot + snapshot-cheatcodes ignores to the node test runner+viem Hardhat 3 template. |
alcuadrado
reviewed
Apr 14, 2026
alcuadrado
approved these changes
Apr 14, 2026
Member
alcuadrado
left a comment
There was a problem hiding this comment.
looks good to me, can you double-check it, @schaable
Co-authored-by: Patricio Palladino <email@patriciopalladino.com>
schaable
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #8126