Skip to content

Commit 653651a

Browse files
ci(lint): auto-fix
1 parent cf29539 commit 653651a

File tree

8 files changed

+20
-20
lines changed

8 files changed

+20
-20
lines changed

packages/component-meta/tests/index.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ
727727
test('emits-generic', () => {
728728
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/events/component-generic.vue');
729729
const meta = checker.getComponentMeta(componentPath);
730-
const foo = meta.events.find(event =>event.name === 'foo');
730+
const foo = meta.events.find(event => event.name === 'foo');
731731

732732
expect(foo?.description).toBe('Emitted when foo...');
733733
});
@@ -736,7 +736,7 @@ const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describ
736736
test.skip('emits-class', () => {
737737
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/events/component-class.vue');
738738
const meta = checker.getComponentMeta(componentPath);
739-
const foo = meta.events.find(event =>event.name === 'foo');
739+
const foo = meta.events.find(event => event.name === 'foo');
740740

741741
expect(foo?.description).toBe('Emitted when foo...');
742742
});
@@ -858,7 +858,7 @@ const checkerOptions: MetaCheckerOptions = {
858858
};
859859
const tsconfigChecker = createChecker(
860860
path.resolve(__dirname, '../../../test-workspace/component-meta/tsconfig.json'),
861-
checkerOptions,
861+
checkerOptions
862862
);
863863
const noTsConfigChecker = createCheckerByJson(
864864
path.resolve(__dirname, '../../../test-workspace/component-meta'),
@@ -868,7 +868,7 @@ const noTsConfigChecker = createCheckerByJson(
868868
"**/*",
869869
],
870870
},
871-
checkerOptions,
871+
checkerOptions
872872
);
873873

874874
worker(tsconfigChecker, true);

packages/language-service/tests/complete.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ for (const dirName of testDirs) {
4343
let complete = await tester.languageService.getCompletionItems(
4444
uri,
4545
position,
46-
{ triggerKind: 1 satisfies typeof vscode.CompletionTriggerKind.Invoked },
46+
{ triggerKind: 1 satisfies typeof vscode.CompletionTriggerKind.Invoked }
4747
);
4848

4949
if (!complete.items.length) {
5050
// fix #2511 test case, it's a bug of TS 5.3
5151
complete = await tester.languageService.getCompletionItems(
5252
uri,
5353
position,
54-
{ triggerKind: 1 satisfies typeof vscode.CompletionTriggerKind.Invoked },
54+
{ triggerKind: 1 satisfies typeof vscode.CompletionTriggerKind.Invoked }
5555
);
5656
}
5757

@@ -107,7 +107,7 @@ function findCompleteActions(text: string) {
107107

108108
return [...text.matchAll(/(\^*)complete:\s*([\S]*)/g)].map(flag => {
109109

110-
const offset = flag.index!;
110+
const offset = flag.index;
111111
const label = flag[2];
112112

113113
return {

packages/language-service/tests/findDefinition.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ for (const dirName of testDirs) {
3636

3737
const locations = await tester.languageService.getDefinition(
3838
uri,
39-
position,
39+
position
4040
);
4141

4242
expect(locations).toBeDefined();
@@ -78,7 +78,7 @@ function findActions(text: string) {
7878

7979
return [...text.matchAll(definitionReg)].map(flag => {
8080

81-
const offset = flag.index!;
81+
const offset = flag.index;
8282
const targetFile = flag[2];
8383
const targeRange = {
8484
start: Number(flag[3]),

packages/language-service/tests/inlayHint.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ for (const dirName of testDirs) {
3838

3939
const inlayHints = await tester.languageService.getInlayHints(
4040
uri,
41-
range,
41+
range
4242
);
4343

4444
const inlayHint = inlayHints?.find(inlayHint => inlayHint.label === action.label);
@@ -69,7 +69,7 @@ function findActions(text: string) {
6969

7070
return [...text.matchAll(inlayHintReg)].map(flag => {
7171

72-
const offset = flag.index!;
72+
const offset = flag.index;
7373
const label = flag[2];
7474

7575
return {

packages/language-service/tests/reference.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ for (const dirName of testDirs) {
3636
const locations = await tester.languageService.getReferences(
3737
uri,
3838
position,
39-
{ includeDeclaration: true },
39+
{ includeDeclaration: true }
4040
);
4141

4242
expect(locations).toBeDefined();
@@ -67,7 +67,7 @@ function findActions(text: string) {
6767

6868
return [...text.matchAll(referenceReg)].map(flag => {
6969

70-
const offset = flag.index!;
70+
const offset = flag.index;
7171
// The definition itself is also counted
7272
const count = Number(flag[2]) + 1;
7373

packages/language-service/tests/rename.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ for (const dirName of testDirs) {
3939
const edit = await tester.languageService.getRenameEdits(
4040
uri,
4141
position,
42-
action.newName,
42+
action.newName
4343
);
4444

4545
expect(edit).toBeDefined();
@@ -86,7 +86,7 @@ function findRenameActions(text: string) {
8686

8787
return [...text.matchAll(renameReg)].map(flag => {
8888

89-
const start = flag.index!;
89+
const start = flag.index;
9090
const end = start + flag[1].length;
9191
const newName = flag[2];
9292

packages/language-service/tests/utils/mockEnv.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export function createMockServiceEnv(
1212
): LanguageServiceEnvironment {
1313
return {
1414
workspaceFolders: [rootUri],
15-
async getConfiguration(section: string) {
15+
getConfiguration(section: string) {
1616
const settings = getSettings();
1717
if (settings[section]) {
1818
return settings[section];

packages/tsc/tests/index.spec.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ function runVueTsc(cwd: string) {
5757
{
5858
silent: true,
5959
cwd
60-
},
60+
}
6161
);
6262

6363
cp.stdout?.setEncoding('utf8');
64-
cp.stdout?.on('data', (data) => {
64+
cp.stdout?.on('data', data => {
6565
console.log(data);
6666
});
6767
cp.stderr?.setEncoding('utf8');
68-
cp.stderr?.on('data', (data) => {
68+
cp.stderr?.on('data', data => {
6969
console.error(data);
7070
});
7171

72-
cp.on('exit', (code) => {
72+
cp.on('exit', code => {
7373
if (code === 0) {
7474
resolve(undefined);
7575
} else {

0 commit comments

Comments
 (0)