-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup action to lint TypeScript packages (#48)
* setup action * fix * fix 2 * fix 3 * fix 4 * fix 5 * fix 6
- Loading branch information
1 parent
b7d9f3d
commit 3b25a1b
Showing
60 changed files
with
3,218 additions
and
3,265 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,29 @@ | ||
name: Lint | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check: | ||
name: Lint TypeScript Packages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: arduino/setup-task@v1 | ||
with: | ||
version: 3.x | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- uses: dtolnay/rust-toolchain@stable | ||
- uses: baptiste0928/cargo-install@v2 | ||
with: | ||
crate: txtpp | ||
features: cli | ||
- run: task themes:ci client:ci docs:ci --output group | ||
- run: task themes:check client:check docs:check --output group |
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,22 +1,46 @@ | ||
version: '3' | ||
|
||
tasks: | ||
txtpp: | ||
desc: Preprocess source files | ||
install: | ||
cmds: | ||
- npm install | ||
|
||
ci: | ||
cmds: | ||
- echo "txtpp disabled for now" | ||
- npm ci | ||
|
||
dev: | ||
desc: Start docs in watch mode | ||
aliases: [d] | ||
cmds: | ||
- npm run dev | ||
- npx vitepress dev src --port 3173 --host | ||
|
||
build: | ||
desc: Build docs assets | ||
aliases: [b] | ||
deps: [txtpp] | ||
cmds: | ||
- npm run build > /dev/null 2> /dev/null | ||
- npx vitepress build src > /dev/null 2> /dev/null | ||
|
||
check: | ||
desc: Check for issues in the docs | ||
cmds: | ||
- txtpp verify src -r | ||
- task: prettier | ||
vars: | ||
PRETTIER_ARGS: --check | ||
|
||
fix: | ||
desc: Fix issues in the docs | ||
deps: [txtpp] | ||
cmds: | ||
- task: prettier | ||
vars: | ||
PRETTIER_ARGS: --write | ||
|
||
txtpp: | ||
desc: Preprocess source files | ||
cmds: | ||
- txtpp src -r | ||
|
||
prettier: | ||
cmds: | ||
- npx prettier "./**/*.{ts,tsx,json,js,jsx,cjs,css,html}" {{.PRETTIER_ARGS}} --config ../web-client/.prettierrc.cjs |
Oops, something went wrong.