Skip to content
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

Install madge NPM package and eliminate circular dependencies #116

Merged
merged 3 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ jobs:
- name: Install npm packages
run: npm ci
- name: Check formatting
run: npm run format:check
run: npm run check.format
- name: Lint code
run: npm run lint
- name: Check for circular imports
run: npm run check.imports
- name: Run build
run: npm run build
- name: Run unit tests
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ npm run lint
> That tells npm you want it to run the script named `lint`, defined in the `package.json` file.
> At the time of this writing, that script runs `eslint src`.

### Run circular import check

Identify circular imports using the [`madge`](https://github.com/pahen/madge) package.

```shell
npm run check.imports
```

### Run automated tests

#### Unit tests
Expand Down Expand Up @@ -155,10 +163,10 @@ You can use it like this:

```shell
# Check whether any files are not formatted.
npx run format:check
npm run check.format

# Format all files.
npx run format
npm run format
```

The `.prettierignore` file tells Prettier which files we want it to
Expand Down
Loading