Skip to content

Commit

Permalink
fix: Warn on circular imports. (#3350)
Browse files Browse the repository at this point in the history
* As title.
* Brings back color when running `yarn formatting` in root, really
needed as we have many warnings, and without it it would be very hard to
parse errors.

We should chip away at these warning.

ChatGPT does *not* think circular dependencies are cool.


![](https://github.com/AztecProtocol/aztec-packages/assets/5764343/34b109f4-d2df-4ebe-b423-65eedcc3d247)
  • Loading branch information
charlielye authored Nov 18, 2023
1 parent 624d733 commit 5bfbddb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions yarn-project/foundation/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ module.exports = {
},
],
'import/no-extraneous-dependencies': 'error',
'import/no-cycle': 'warn',
'tsdoc/syntax': JSDOC_RULES_LEVEL,
'jsdoc/require-jsdoc': [
JSDOC_RULES_LEVEL,
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"prepare": "node ./yarn-project-base/scripts/update_package_jsons.mjs && yarn workspaces foreach run prepare && workspaces-to-typescript-project-references --tsconfigPath tsconfig.json && prettier -w */tsconfig.json",
"prepare:check": "node ./yarn-project-base/scripts/update_package_jsons.mjs --check && workspaces-to-typescript-project-references --check --tsconfigPath tsconfig.json",
"docs": "typedoc --out docs/dist && cd docs && yarn serve",
"formatting": "yarn workspaces foreach -p -j unlimited -v run formatting",
"formatting:fix": "yarn workspaces foreach -p -v run formatting:fix",
"formatting": "FORCE_COLOR=true yarn workspaces foreach -p -j unlimited -v run formatting",
"formatting:fix": "FORCE_COLOR=true yarn workspaces foreach -p -v run formatting:fix",
"lint": "yarn eslint --cache --ignore-pattern l1-artifacts .",
"format": "yarn prettier --cache -w .",
"test": "yarn workspaces foreach --exclude @aztec/aztec3-packages --exclude @aztec/end-to-end --exclude @aztec/canary --exclude private-token -p -j unlimited -v run test",
Expand Down

0 comments on commit 5bfbddb

Please sign in to comment.