vscode-peacock
vscode-peacock copied to clipboard
refactor: break non live-share circular dependencies
I'm trying to import this extension and use it in Google, however our TS rules doesn't allow circular dependencies.
Live-share related imports are not needed, hence not resolved.
Output of npx madge --exclude='live-share' --circular --extensions ts ./:
⠋ Finding files=============
WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.
You may find that it works just fine, or you may not.
SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.2.0
YOUR TYPESCRIPT VERSION: 5.4.5
Please only submit bug reports when using the officially supported version.
=============
Processed 53 files (3.4s)
✔ No circular dependency found!
This pull request includes several changes to improve the organization and functionality of the configuration and color management codebase. The most important changes involve refactoring the configuration functions, reordering imports, and modularizing the code.
Refactoring and modularization:
-
src/configuration/foreground-color.ts: Added new functionsgetDarkForegroundColorOrOverride,getLightForegroundColorOrOverride,getDarkForegroundColor, andgetLightForegroundColorto handle foreground color configurations. -
src/configuration/utils.ts: Introduced a new utility functionreadConfigurationto read configuration settings. -
src/configuration/workspace.ts: Moved the functiongetColorCustomizationConfigFromWorkspaceto a separate file for better modularization.
Reordering imports:
-
src/color-library.ts: Reordered and grouped imports for better readability and maintainability. -
src/configuration/read-configuration.ts: Reorganized imports and removed redundant import statements.
Code cleanup and removal of redundant functions:
-
src/configuration/read-configuration.ts: Removed redundant functionsgetColorCustomizationConfigFromWorkspace,readConfiguration,getDarkForegroundColor,getDarkForegroundColorOrOverride,getLightForegroundColor, andgetLightForegroundColorOrOverride. [1] [2] [3] [4]