Skip to content

Commit

Permalink
feat(lint): add tsl linter and auto fix workflow (#4100)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Mar 15, 2024
1 parent 28b1dd6 commit 1841b10
Show file tree
Hide file tree
Showing 5 changed files with 140 additions and 6 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/auto-fix.yml
@@ -0,0 +1,36 @@
name: auto-fix

on:
push:
branches:
- 'master'

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

- uses: pnpm/action-setup@v2
with:
version: latest

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

- run: pnpm install

# lint
- name: Auto-fix
run: npm 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: 4 additions & 0 deletions package.json
Expand Up @@ -14,12 +14,16 @@
"release:next-base": "npm run release:base -- --dist-tag next",
"release:next-vue": "cd ./extensions/vscode && npm run release:next",
"test": "vitest run",
"lint": "tsl --projects packages/*/tsconfig.json",
"lint:fix": "npm run lint -- --fix",
"chrome": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=./extensions/vscode ../volar-starter"
},
"devDependencies": {
"@lerna-lite/cli": "latest",
"@lerna-lite/publish": "latest",
"@volar/language-service": "~2.1.2",
"@volar/tsl-config": "latest",
"tsl": "latest",
"typescript": "latest",
"vite": "latest",
"vitest": "latest"
Expand Down
6 changes: 3 additions & 3 deletions packages/language-service/package.json
Expand Up @@ -33,14 +33,14 @@
"volar-service-typescript": "0.0.31-patch.1",
"volar-service-typescript-twoslash-queries": "0.0.31",
"vscode-html-languageservice": "^5.1.0",
"vscode-languageserver-textdocument": "^1.0.11"
"vscode-languageserver-textdocument": "^1.0.11",
"vscode-uri": "^3.0.8"
},
"devDependencies": {
"@types/node": "latest",
"@types/path-browserify": "latest",
"@volar/kit": "~2.1.2",
"@vue/typescript-plugin": "2.0.6",
"vscode-languageserver-protocol": "^3.17.5",
"vscode-uri": "^3.0.8"
"vscode-languageserver-protocol": "^3.17.5"
}
}
99 changes: 96 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tsl.config.ts
@@ -0,0 +1 @@
export { default } from '@volar/tsl-config';

0 comments on commit 1841b10

Please sign in to comment.