-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@nomiclabs/hardhat-solhint does not work #3724
Comments
I have the same issue. I'll try to push a fix later today |
@Oni-giri I'll have a look on my free time 👌 |
Hi @mhm13dev! diff --git a/node_modules/@nomiclabs/hardhat-solhint/dist/src/index.js b/node_modules/@nomiclabs/hardhat-solhint/dist/src/index.js
index acf1244..cbaff27 100644
--- a/node_modules/@nomiclabs/hardhat-solhint/dist/src/index.js
+++ b/node_modules/@nomiclabs/hardhat-solhint/dist/src/index.js
@@ -30,8 +30,7 @@ function getDefaultConfig() {
}
function getFormatter(formatterName = "stylish") {
try {
- const solhintPath = require.resolve("solhint");
- const formatterPath = require.resolve(`eslint/lib/formatters/${formatterName}`, { paths: [solhintPath] });
+ const formatterPath = require.resolve(`solhint/lib/formatters/${formatterName}`);
return require(formatterPath);
}
catch (ex) { |
Okay I will use the patch-package for now. |
Version of Hardhat
2.12.7
What happened?
Caused by: Error: Cannot find module 'eslint/lib/formatters/stylish'
calling:
https://github.com/NomicFoundation/hardhat/blob/main/packages/hardhat-solhint/src/index.ts#L12
Minimal reproduction steps
Search terms
solhint hardhat-solhint
The text was updated successfully, but these errors were encountered: