Skip to content

Commit

Permalink
Fix linter in toolbox
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio committed Jun 7, 2023
1 parent 1409b0a commit 1b5e1cf
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/hardhat-toolbox/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
extends: [`${__dirname}/../../config/eslint/eslintrc.js`],
parserOptions: {
project: `${__dirname}/tsconfig.json`,
project: `${__dirname}/src/tsconfig.json`,
sourceType: "module",
},
};
5 changes: 5 additions & 0 deletions packages/hardhat-toolbox/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@
/test/fixture-projects/**/artifacts
/test/fixture-projects/**/artifacts-dir
/test/fixture-projects/**/cache
/*.d.ts
/*.d.ts.map
/*.js
/*.js.map
/build-test
CHANGELOG.md
3 changes: 1 addition & 2 deletions packages/hardhat-toolbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ If you want to migrate an existing Hardhat project to use the Toolbox, read [our

### Network Helpers

When the Toolbox is installed using npm 7 or later, its peer dependencies are automatically installed. However, these dependencies won't be listed in the `package.json`. As a result, directly importing the Network Helpers can be problematic for certain tools or IDEs.
To address this issue, the Toolbox re-exports the Hardhat Network Helpers. You can use them like this:
When the Toolbox is installed using npm 7 or later, its peer dependencies are automatically installed. However, these dependencies won't be listed in the `package.json`. As a result, directly importing the Network Helpers can be problematic for certain tools or IDEs. To address this issue, the Toolbox re-exports the Hardhat Network Helpers. You can use them like this:

```ts
import helpers from "@nomicfoundation/hardhat-toolbox/network-helpers";
Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat-toolbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"test": "mocha --recursive \"test/**/*.ts\" --exit",
"build": "tsc --build .",
"prepublishOnly": "yarn build",
"clean": "rimraf dist"
"clean": "rimraf dist *.{d.ts,js}{,.map} build-test tsconfig.tsbuildinfo"
},
"files": [
"src/",
Expand Down
15 changes: 15 additions & 0 deletions packages/hardhat-toolbox/test/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
extends: [`${__dirname}/../.eslintrc.js`],
parserOptions: {
project: `${__dirname}/../tsconfig.json`,
sourceType: "module",
},
rules: {
"import/no-extraneous-dependencies": [
"error",
{
devDependencies: true,
},
],
},
};

0 comments on commit 1b5e1cf

Please sign in to comment.