-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: add knip package * ci: test listing * ci: test listing * revert: prior info command * ci: test knip * ci: show warnings instead of errors * ci: test showing knip error * ci: test showing knip error * ci: test showing knip error * revert: prior plain state * chore: change script name * ci: remove on push main
- Loading branch information
1 parent
858c448
commit c5a2c9c
Showing
11 changed files
with
222 additions
and
42 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,48 @@ | ||
# Find unused files, dependencies and exports in JavaScript and TypeScript projects. | ||
name: Knip | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
|
||
env: | ||
CACHE_NAME: cache-node-modules | ||
|
||
jobs: | ||
knip: | ||
name: Knip | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Get yarn cache directory path | ||
id: yarn-cache-dir-path | ||
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: Cache node modules | ||
id: cache-yarn | ||
uses: actions/cache@v4 | ||
with: | ||
# Below is an another cache folder on ubuntu | ||
# path: ~/.cache/yarn | ||
path: ${{ steps.yarn-cache-dir-path.outputs.yarn_cache_dir }} | ||
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}\ | ||
-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: ${{ runner.os }}-build-${{ env.CACHE_NAME }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
|
||
- if: ${{ steps.cache-yarn.outputs.cache-hit != 'true' }} | ||
name: Info the state of node modules | ||
continue-on-error: true | ||
run: yarn info --name-only | ||
|
||
- name: Install Dependencies | ||
run: yarn install --immutable | ||
|
||
- name: Run Knip | ||
# continue-on-error: true | ||
run: yarn knip |
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
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
export const enum ROUTE { | ||
HOME = '/', | ||
SIGNIN = '/sign-in', | ||
SIGNOUT = '/sign-out', | ||
MONTHLY_REPORT = '/monthly-report', | ||
CHART = '/chart', | ||
CATEGORIES = '/categories', | ||
SETTINGS = '/settings', | ||
FEEDBACK = '/feedback', | ||
ISSUE = '/issue', | ||
MOBILE_TEMPORARILY_NOT_ALLOWED = '/mobile-temporarily-not-allowed', | ||
} |
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
Oops, something went wrong.