mirror of
https://github.com/cline/cline.git
synced 2026-09-21 05:10:09 +08:00
dev: migrate to Biome for linting/formatting (#5423)
* Migrate to Biome for linting/formatting and simplify hooks - Add biome.jsonc and @biomejs CLI; configure VS Code to use Biome for format/fix and imports - Replace verbose Husky pre-commit with lint-staged runner - Remove ESLint setup and custom rule package (no-direct-vscode-api) and its tests - Update package.json/package-lock and webview-ui package to reflect tooling change - Add VS Code host typings and grit definitions under src/hosts Rationale: unify lint/format tooling, speed up pre-commit checks, and reduce maintenance overhead from custom ESLint rules. * remove eslint dependencies * preserve eslint rules * clean up * update files list * add docs * fix build * clean up * update VSCode API usage detection in Grit rule This commit updates the Grit rule for detecting VSCode API usage: - Narrow down the list of monitored VSCode API methods - Add more specific diagnostic messages for direct API usage - Introduce a new check for `workspaceFolders` property - Exclude `src/extension.ts` from the Grit rule in Biome configuration The changes aim to improve code abstraction and provide clearer guidance for replacing direct VSCode API calls. * adds new cacheService rule * add back pre-commit * Remove ESLint custom rule and update linting references Remove custom ESLint rule for VSCode state API enforcement along with its tests, remove ESLint extension recommendation, and update documentation to use generic "linter" terminology instead of ESLint-specific references. * update vscode.d.ts for IntelliSense * remove format on save * clean up default values * update to 2.1.4 * buf lint * format
This commit is contained in:
@@ -71,13 +71,7 @@ jobs:
|
||||
- name: Install xvfb on Linux
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get update && sudo apt-get install -y xvfb
|
||||
|
||||
- name: Install local modules on windows
|
||||
if: runner.os == 'Windows' && steps.root-cache.outputs.cache-hit == 'true'
|
||||
run: |
|
||||
npm install eslint-plugin-eslint-rules
|
||||
cd webview-ui/ && npm install eslint-plugin-eslint-rules
|
||||
|
||||
|
||||
- name: Set up NPM on Windows
|
||||
if: runner.os == 'Windows'
|
||||
run: |
|
||||
@@ -86,10 +80,10 @@ jobs:
|
||||
- name: Type Check
|
||||
run: npm run check-types
|
||||
|
||||
- name: ESLint Check
|
||||
- name: Lint Check
|
||||
run: npm run lint
|
||||
|
||||
- name: Prettier / Format Check
|
||||
- name: Format Check
|
||||
run: npm run format
|
||||
|
||||
# Build the extension before running tests
|
||||
|
||||
Reference in New Issue
Block a user