Skip to content

Commit

Permalink
Fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alcuadrado committed Oct 26, 2024
1 parent a0a9d3d commit f1f10f2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/eslint/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports.slowImportsCommonIgnoredModules = [
"chalk",
"picocolors",
"debug",
"find-up",
"fs-extra",
Expand Down
4 changes: 3 additions & 1 deletion packages/hardhat-core/src/builtin-tasks/compile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,9 @@ subtask(TASK_COMPILE_SOLIDITY_LOG_COMPILATION_ERRORS)
getFormattedInternalCompilerErrorMessage(error) ??
error.formattedMessage;

console.error(errorMessage.replace(/^\w+:/, (t) => chalk.bold(chalk.red(t))));
console.error(
errorMessage.replace(/^\w+:/, (t) => chalk.bold(chalk.red(t)))
);
} else {
console.warn(
(error.formattedMessage as string).replace(/^\w+:/, (t) =>
Expand Down
7 changes: 5 additions & 2 deletions packages/hardhat-core/src/internal/util/glob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export async function glob(
pattern: string,
options: GlobOptions = {}
): Promise<string[]> {
const files = await (await import('tinyglobby')).glob([pattern], options);
const files = await (await import("tinyglobby")).glob([pattern], options);
return files.map(path.normalize);
}

Expand All @@ -23,6 +23,9 @@ export async function glob(
* @see glob
*/
export function globSync(pattern: string, options: GlobOptions = {}): string[] {
const files = (require('tinyglobby') as typeof import('tinyglobby')).globSync([pattern], options);
const files = (require("tinyglobby") as typeof import("tinyglobby")).globSync(
[pattern],
options
);
return files.map(path.normalize);
}

0 comments on commit f1f10f2

Please sign in to comment.