forked from blockchain/blockchain-wallet-v4-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(circular deps): add pre-push commit hook to check for circular deps
- Loading branch information
Andrew Schneider
committed
Sep 30, 2021
1 parent
5ac767a
commit 9632b0d
Showing
3 changed files
with
431 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* eslint-disable */ | ||
const chalk = require('chalk') | ||
const madge = require('madge') | ||
|
||
madge('./packages/blockchain-wallet-v4-frontend/src/index.js').then((res) => { | ||
const result = res.circular() | ||
if (result && result.length > 0) { | ||
console.log(chalk.red.bold(`Error: ${result.length} circular dependencies found`)) | ||
result.forEach((r) => { | ||
console.log(chalk.yellow(JSON.stringify(r))) | ||
}) | ||
process.exit(1) | ||
} | ||
}) |
Oops, something went wrong.