Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lint): add tsl linter and auto fix workflow #4100

Merged
merged 1 commit into from Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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';