-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: TS + Lint in CI * fix * feat: Lint CI * Update lint-typescript.yml * Update lint-typescript.yml * Update package.json
- Loading branch information
Showing
7 changed files
with
95 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: Lint TypeScript | ||
|
||
permissions: | ||
checks: write | ||
contents: read | ||
pull-requests: read | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '.github/workflows/lint-typescript.yml' | ||
- '**/*.ts' | ||
- '**/*.tsx' | ||
- '**/*.js' | ||
- '**/*.jsx' | ||
- '**/*.json' | ||
- '**/*.lockb' | ||
- '**/package.json' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/lint-typescript.yml' | ||
- '**/*.ts' | ||
- '**/*.tsx' | ||
- '**/*.js' | ||
- '**/*.jsx' | ||
- '**/*.json' | ||
- '**/*.lockb' | ||
- '**/package.json' | ||
|
||
jobs: | ||
tsc: | ||
name: Compile TypeScript (tsc) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: oven-sh/setup-bun@v1 | ||
- uses: reviewdog/action-setup@v1 | ||
|
||
- name: Install npm dependencies (bun) | ||
run: bun install | ||
|
||
- name: Run TypeScript (tsc) | ||
run: | | ||
bun typescript | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-on-error -tee | ||
env: | ||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
lint: | ||
name: Lint TypeScript (eslint, prettier) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: oven-sh/setup-bun@v1 | ||
- uses: reviewdog/action-setup@v1 | ||
|
||
- name: Install npm dependencies (bun) | ||
run: bun install | ||
|
||
- name: Run ESLint CI in example/ | ||
working-directory: example | ||
run: bun lint-ci | ||
- name: Run ESLint CI in packages/nitrogen | ||
working-directory: packages/nitrogen | ||
run: bun lint-ci | ||
- name: Run ESLint CI in packages/react-native-nitro-image | ||
working-directory: packages/react-native-nitro-image | ||
run: bun lint-ci | ||
- name: Run ESLint CI in packages/react-native-nitro-modules | ||
working-directory: packages/react-native-nitro-modules | ||
run: bun lint-ci | ||
|
||
- name: Run ESLint with auto-fix in example/ | ||
working-directory: example | ||
run: bun lint | ||
- name: Run ESLint with auto-fix in packages/nitrogen | ||
working-directory: packages/nitrogen | ||
run: bun lint | ||
- name: Run ESLint with auto-fix in packages/react-native-nitro-image | ||
working-directory: packages/react-native-nitro-image | ||
run: bun lint | ||
- name: Run ESLint with auto-fix in packages/react-native-nitro-modules | ||
working-directory: packages/react-native-nitro-modules | ||
run: bun lint | ||
|
||
- name: Verify no files have changed after auto-fix | ||
run: git diff --exit-code HEAD |
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 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