Skip to content

Commit

Permalink
lint: add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jun 8, 2024
1 parent 120bcd2 commit 36e4b37
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/auto-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: auto-fix

on:
push:
branches:
- 'master'

jobs:
auto-fix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- run: pnpm install

# build
- run: pnpm run build

# lint
- name: Auto-fix
run: pnpm run lint:fix

# commit
- name: Commit
uses: EndBug/add-and-commit@v9
with:
message: "ci(lint): auto-fix"
default_author: github_actions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"prerelease": "npm run build",
"release": "npm run release:base && npm run release:vscode",
"release:base": "lerna publish --exact --force-publish --yes --sync-workspace-lock",
"release:vscode": "cd packages/vscode && npm run release"
"release:vscode": "cd packages/vscode && npm run release",
"lint": "node packages/cli/bin/tsslint.js --projects 'packages/*/tsconfig.json'",
"lint:fix": "npm run lint -- --fix"
},
"devDependencies": {
"@lerna-lite/cli": "latest",
Expand Down
4 changes: 4 additions & 0 deletions tsslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default (await import(
// @ts-ignore
'https://raw.githubusercontent.com/volarjs/volar.js/master/tsslint.config.ts'
)).default;

0 comments on commit 36e4b37

Please sign in to comment.