Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
63746b8
upgrade prettier, replace tslint packages with eslint packages
ItsNickBarry Apr 16, 2025
7ee9ff2
partially migrate tslint config to eslint
ItsNickBarry Apr 16, 2025
b1cb5f8
add missing eslint-config-prettier dependency
ItsNickBarry Apr 16, 2025
45ee90a
upgrade dependencies
ItsNickBarry Apr 16, 2025
01e4dcb
update NomicLabs references to NomicFoundation
ItsNickBarry Apr 16, 2025
641e296
Merge branch 'foundation' into hh3
ItsNickBarry Apr 16, 2025
14d7fbe
upgrade hardhat dependency
ItsNickBarry Apr 16, 2025
7b65701
set package type to module
ItsNickBarry Apr 16, 2025
d7ae608
update tsconfig target
ItsNickBarry Apr 16, 2025
f63e173
convert eslint config to es module
ItsNickBarry Apr 16, 2025
04c163b
run lint fix script
ItsNickBarry Apr 16, 2025
0349914
export HardhatPlugin object
ItsNickBarry Apr 16, 2025
f33c61e
set package.json name as plugin id
ItsNickBarry Apr 16, 2025
6afcc59
add types and update example type-extensions
ItsNickBarry Apr 16, 2025
77c3183
add resolveUserConfig hook handler
ItsNickBarry Apr 16, 2025
23f73eb
fix types
ItsNickBarry Apr 16, 2025
40f2890
add validateUserConfig hook handler
ItsNickBarry Apr 16, 2025
90ea15f
add example task
ItsNickBarry Apr 16, 2025
94172ad
update test configuration
ItsNickBarry Apr 16, 2025
1500b97
comment unused runtime extension code
ItsNickBarry Apr 16, 2025
58b3a75
lint
ItsNickBarry Apr 16, 2025
bfa0466
remove environment extension code
ItsNickBarry Apr 16, 2025
3b74581
set npmPackage value
ItsNickBarry Apr 16, 2025
decefeb
replace mocha and chai packages with hardhat-node-test-runner
ItsNickBarry Apr 16, 2025
f2087b2
fix test script
ItsNickBarry Apr 16, 2025
936504a
add return value to task
ItsNickBarry Apr 16, 2025
75f3cb9
update tests
ItsNickBarry Apr 16, 2025
1cab05b
gitignore artifacts/
ItsNickBarry Apr 16, 2025
360c029
update readme
ItsNickBarry Apr 16, 2025
6f2f32a
remove migration guide
ItsNickBarry Apr 16, 2025
affcc48
export task names
ItsNickBarry Apr 16, 2025
f894d4c
fix task-names import
ItsNickBarry Apr 16, 2025
5d85418
update readme
ItsNickBarry Apr 16, 2025
10529b6
move core logic to lib/ directory
ItsNickBarry Apr 16, 2025
3a5f73f
clean tsc output on build
ItsNickBarry Apr 17, 2025
92d22f1
remove test config, update test script
ItsNickBarry Apr 17, 2025
039f755
remove hardhat-node-test-runner
ItsNickBarry Apr 17, 2025
8c1c823
do not force pkg.name type
ItsNickBarry Apr 17, 2025
6eae9bc
add task action type parameter note
ItsNickBarry Apr 19, 2025
9105317
fix build script
ItsNickBarry Apr 20, 2025
96c01ec
exclude artifacts from tsc
ItsNickBarry Apr 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/artifacts
/dist

# Logs
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Nomic Labs LLC
Copyright (c) 2025 Nomic Foundation LLC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
154 changes: 0 additions & 154 deletions MIGRATION.md

This file was deleted.

37 changes: 15 additions & 22 deletions README-TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,23 @@ This plugin will help you with world domination by implementing a simple tic-tac
npm install <your npm package name> [list of peer dependencies]
```

Import the plugin in your `hardhat.config.js`:
Import the plugin in your `hardhat.config.ts` and register it in your `HardhatUserConfig`:

```js
require("<your plugin npm package name>");
```

Or if you are using TypeScript, in your `hardhat.config.ts`:
```typescript
import HardhatExamplePlugin from "<your plugin npm package name>";

```ts
import "<your plugin npm package name>";
const config: HardhatUserConfig = {
plugins: [
HardhatExamplePlugin,
],
};
```


## Required plugins

<_The list of all the required Hardhat plugins if there are any_>

- [@nomiclabs/hardhat-web3](https://github.com/nomiclabs/hardhat/tree/master/packages/hardhat-web3)
- [@nomicfoundation/hardhat-ethers](https://github.com/NomicFoundation/hardhat/tree/main/packages/hardhat-ethers)

## Tasks

Expand All @@ -51,13 +50,6 @@ This plugin adds the _example_ task to Hardhat:
output of `npx hardhat help example`
```

## Environment extensions

<_A description of each extension to the Hardhat Runtime Environment_>

This plugin extends the Hardhat Runtime Environment by adding an `example` field
whose type is `ExampleHardhatRuntimeEnvironmentField`.

## Configuration

<_A description of each extension to the HardhatConfig or to its fields_>
Expand All @@ -67,11 +59,12 @@ This plugin extends the `HardhatUserConfig`'s `ProjectPathsUserConfig` object wi

This is an example of how to set it:

```js
module.exports = {
paths: {
newPath: "new-path"
}
```typescript
const config: HardhatUserConfig = {
examplePlugin: {
value: 'asdf',
},
...
};
```

Expand Down
11 changes: 2 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ publishing it to npm.
This sample project contains an example on how to do that, but also comes with
many more features:

- A mocha test suite ready to use
- TravisCI already setup
- A package.json with scripts and publishing info
- Examples on how to do different things
Expand All @@ -26,17 +25,15 @@ Make sure to read our [Plugin Development Guide](https://hardhat.org/advanced/bu

## Testing

Running `npm run test` will run every test located in the `test/` folder. They
use [mocha](https://mochajs.org) and [chai](https://www.chaijs.com/),
but you can customize them.
Running `npm run test` will run every test located in the `test/` folder.

We recommend creating unit tests for your own modules, and integration tests for
the interaction of the plugin with Hardhat and its dependencies.

## Linting and autoformat

All of Hardhat projects use [prettier](https://prettier.io/) and
[tslint](https://palantir.github.io/tslint/).
[eslint](https://eslint.org/).

You can check if your code style is correct by running `npm run lint`, and fix
it with `npm run lint:fix`.
Expand All @@ -52,7 +49,3 @@ plugin users.

Take a look at `README-TEMPLATE.md` for an example of what a Hardhat plugin's
README should look like.

## Migrating from Buidler?

Take a look at [the migration guide](MIGRATION.md)!
37 changes: 37 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";

export default [
eslintPluginPrettierRecommended,
// {
// "extends": [
// "eslint:latest",
// "eslint-plugin-prettier",
// ],
// "rules": {
// "prettier": true,
// "object-literal-sort-keys": false,
// "no-submodule-imports": false,
// "interface-name": false,
// "max-classes-per-file": false,
// "no-empty": false,
// "no-console": false,
// "only-arrow-functions": false,
// "variable-name": [
// true,
// "check-format",
// "allow-leading-underscore",
// "allow-pascal-case"
// ],
// "ordered-imports": [
// true,
// {
// "grouped-imports": true,
// "import-sources-order": "case-insensitive"
// }
// ],
// "no-floating-promises": true,
// "prefer-conditional-expression": false,
// "no-implicit-dependencies": true
// }
// }
];
Loading