-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: ygqygq2 <[email protected]>
- Loading branch information
Showing
43 changed files
with
937 additions
and
992 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
// .vscode-test-debug.mjs | ||
import { defineConfig } from '@vscode/test-cli'; | ||
|
||
export default defineConfig([ | ||
{ | ||
label: 'suiteTests', | ||
files: 'out/test/suite/*.test.js', | ||
version: '1.88.0', | ||
mocha: { | ||
ui: 'bdd', | ||
require: ['ts-node/register', 'tsconfig-paths/register'], | ||
} | ||
}, | ||
]); |
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,16 +1,24 @@ | ||
// .vscode-test.mjs | ||
import { defineConfig } from '@vscode/test-cli'; | ||
import path from 'path'; | ||
|
||
// suiteTests 使用 vscode-test 测试,当前无法直接支持 ts,它需要编译成js | ||
// unitTests 直接使用 mocha 测试,直接使用 ts | ||
const workspacePath = path.resolve('sampleWorkspace', 'test.code-workspace'); | ||
|
||
// suiteTests 使用 vscode-test/mocha 测试,当前无法直接支持 ts,它需要编译成js | ||
// unitTests 使用 vitest 测试,直接使用 ts | ||
export default defineConfig([ | ||
{ | ||
label: 'suiteTests', | ||
files: 'out/test/suite/*.test.js', | ||
version: '1.88.0', | ||
mocha: { | ||
ui: 'tdd', | ||
timeout: 20000, | ||
ui: 'bdd', | ||
require: ['ts-node/register', 'tsconfig-paths/register'], | ||
}, | ||
launchArgs: [workspacePath] | ||
.concat(['--skip-welcome']) | ||
.concat(['--disable-extensions']) | ||
.concat(['--skip-release-notes']) | ||
.concat(['--enable-proposed-api']), | ||
}, | ||
]); |
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 @@ | ||
import eslint from '@eslint/js'; | ||
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; | ||
import simpleImportSortPlugin from 'eslint-plugin-simple-import-sort'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
export default tseslint.config( | ||
{ | ||
files: ['**/*.ts'], | ||
plugins:{ | ||
['simple-import-sort']: simpleImportSortPlugin, | ||
} | ||
}, | ||
{ ignores: ['sampleWorkspace', 'out', 'dist', '**/*.d.ts'] }, | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommended, | ||
eslintPluginPrettierRecommended, | ||
{ | ||
rules: { | ||
'@typescript-eslint/no-unused-vars': [ | ||
'warn', | ||
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_' }, | ||
], | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
'simple-import-sort/imports': 'warn', | ||
'simple-import-sort/exports': 'warn', | ||
'prettier/prettier': 'warn' | ||
}, | ||
}, | ||
); |
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
Oops, something went wrong.