Skip to content

Commit 70c13af

Browse files
ci(lint): auto-fix
1 parent f6386e7 commit 70c13af

File tree

173 files changed

+2774
-2435
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+2774
-2435
lines changed

.vscode/launch.json

Lines changed: 52 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
1-
// A launch configuration that compiles the extension and then opens it inside a new window
2-
{
3-
"version": "0.2.0",
4-
"configurations": [
5-
{
6-
"name": "Launch Client",
7-
"type": "extensionHost",
8-
"request": "launch",
9-
"autoAttachChildProcesses": true,
10-
"runtimeExecutable": "${execPath}",
11-
"args": [
12-
"--extensionDevelopmentPath=${workspaceRoot}/extensions/vscode",
13-
"--folder-uri=${workspaceRoot}/test-workspace",
14-
],
15-
"outFiles": [
16-
"${workspaceRoot}/**/*.js"
17-
],
18-
"preLaunchTask": {
19-
"type": "npm",
20-
"script": "watch"
21-
}
22-
},
23-
{
24-
"name": "Launch Web Client",
25-
"type": "pwa-extensionHost",
26-
"debugWebWorkerHost": true,
27-
"request": "launch",
28-
"args": [
29-
"--disable-extensions",
30-
"--extensionDevelopmentPath=${workspaceFolder}/extensions/vscode",
31-
"--extensionDevelopmentKind=web"
32-
],
33-
"outFiles": [
34-
"${workspaceRoot}/**/*.js"
35-
],
36-
"preLaunchTask": {
37-
"type": "npm",
38-
"script": "watch"
39-
}
40-
},
41-
{
42-
"name": "Attach to Language Server",
43-
"type": "node",
44-
"request": "attach",
45-
"port": 6009,
46-
"restart": true,
47-
"outFiles": [
48-
"${workspaceRoot}/**/*.js"
49-
]
50-
}
51-
],
52-
}
1+
// A launch configuration that compiles the extension and then opens it inside a new window
2+
{
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"name": "Launch Client",
7+
"type": "extensionHost",
8+
"request": "launch",
9+
"autoAttachChildProcesses": true,
10+
"runtimeExecutable": "${execPath}",
11+
"args": [
12+
"--extensionDevelopmentPath=${workspaceRoot}/extensions/vscode",
13+
"--folder-uri=${workspaceRoot}/test-workspace"
14+
],
15+
"outFiles": [
16+
"${workspaceRoot}/**/*.js"
17+
],
18+
"preLaunchTask": {
19+
"type": "npm",
20+
"script": "watch"
21+
}
22+
},
23+
{
24+
"name": "Launch Web Client",
25+
"type": "pwa-extensionHost",
26+
"debugWebWorkerHost": true,
27+
"request": "launch",
28+
"args": [
29+
"--disable-extensions",
30+
"--extensionDevelopmentPath=${workspaceFolder}/extensions/vscode",
31+
"--extensionDevelopmentKind=web"
32+
],
33+
"outFiles": [
34+
"${workspaceRoot}/**/*.js"
35+
],
36+
"preLaunchTask": {
37+
"type": "npm",
38+
"script": "watch"
39+
}
40+
},
41+
{
42+
"name": "Attach to Language Server",
43+
"type": "node",
44+
"request": "attach",
45+
"port": 6009,
46+
"restart": true,
47+
"outFiles": [
48+
"${workspaceRoot}/**/*.js"
49+
]
50+
}
51+
]
52+
}

.vscode/tasks.json

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
1-
{
2-
"version": "2.0.0",
3-
"tasks": [
4-
{
5-
"type": "npm",
6-
"script": "compile",
7-
"group": "build",
8-
"presentation": {
9-
"panel": "dedicated",
10-
"reveal": "never"
11-
},
12-
"problemMatcher": [
13-
"$tsc"
14-
]
15-
},
16-
{
17-
"type": "npm",
18-
"script": "watch",
19-
"isBackground": true,
20-
"group": {
21-
"kind": "build",
22-
"isDefault": true
23-
},
24-
"presentation": {
25-
"panel": "dedicated",
26-
"reveal": "never"
27-
},
28-
"problemMatcher": {
29-
"pattern": {
30-
"regexp": "__________"
31-
},
32-
"background": {
33-
"activeOnStart": true,
34-
"beginsPattern": " ",
35-
"endsPattern": "Waiting for changes..."
36-
}
37-
}
38-
}
39-
]
40-
}
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "npm",
6+
"script": "compile",
7+
"group": "build",
8+
"presentation": {
9+
"panel": "dedicated",
10+
"reveal": "never"
11+
},
12+
"problemMatcher": [
13+
"$tsc"
14+
]
15+
},
16+
{
17+
"type": "npm",
18+
"script": "watch",
19+
"isBackground": true,
20+
"group": {
21+
"kind": "build",
22+
"isDefault": true
23+
},
24+
"presentation": {
25+
"panel": "dedicated",
26+
"reveal": "never"
27+
},
28+
"problemMatcher": {
29+
"pattern": {
30+
"regexp": "__________"
31+
},
32+
"background": {
33+
"activeOnStart": true,
34+
"beginsPattern": " ",
35+
"endsPattern": "Waiting for changes..."
36+
}
37+
}
38+
}
39+
]
40+
}

extensions/vscode/index.ts

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@ import { activateAutoInsertion, activateDocumentDropEdit, createLabsInfo, middle
22
import * as lsp from '@volar/vscode/node';
33
import * as fs from 'node:fs';
44
import * as path from 'node:path';
5-
import { defineExtension, executeCommand, extensionContext, nextTick, onDeactivate, useActiveTextEditor, useCommand, useOutputChannel, useVisibleTextEditors, watch } from 'reactive-vscode';
5+
import {
6+
defineExtension,
7+
executeCommand,
8+
extensionContext,
9+
nextTick,
10+
onDeactivate,
11+
useActiveTextEditor,
12+
useCommand,
13+
useOutputChannel,
14+
useVisibleTextEditors,
15+
watch,
16+
} from 'reactive-vscode';
617
import * as vscode from 'vscode';
718
import { config } from './lib/config';
819
import { activate as activateSplitEditors } from './lib/splitEditors';
@@ -24,10 +35,11 @@ export const { activate, deactivate } = defineExtension(async () => {
2435
const activeTextEditor = useActiveTextEditor();
2536
const visibleTextEditors = useVisibleTextEditors();
2637
const { stop } = watch(activeTextEditor, () => {
27-
28-
if (!visibleTextEditors.value.some(
29-
editor => config.server.includeLanguages.includes(editor.document.languageId),
30-
)) {
38+
if (
39+
!visibleTextEditors.value.some(
40+
editor => config.server.includeLanguages.includes(editor.document.languageId),
41+
)
42+
) {
3143
return;
3244
}
3345

@@ -45,7 +57,12 @@ export const { activate, deactivate } = defineExtension(async () => {
4557

4658
// Setup typescript.js in production mode
4759
if (fs.existsSync(path.join(__dirname, 'language-server.js'))) {
48-
fs.writeFileSync(path.join(__dirname, 'typescript.js'), `module.exports = require("${vscode.env.appRoot.replace(/\\/g, '/')}/extensions/node_modules/typescript/lib/typescript.js");`);
60+
fs.writeFileSync(
61+
path.join(__dirname, 'typescript.js'),
62+
`module.exports = require("${
63+
vscode.env.appRoot.replace(/\\/g, '/')
64+
}/extensions/node_modules/typescript/lib/typescript.js");`,
65+
);
4966
}
5067

5168
volarLabs.addLanguageClient(client = launch(context));
@@ -55,7 +72,6 @@ export const { activate, deactivate } = defineExtension(async () => {
5572
activateAutoInsertion(selectors, client);
5673
activateDocumentDropEdit(selectors, client);
5774
activateSplitEditors(client);
58-
5975
}, { immediate: true });
6076

6177
useCommand('vue.action.restartServer', async () => {
@@ -113,7 +129,7 @@ function launch(context: vscode.ExtensionContext) {
113129
);
114130

115131
client.onNotification('tsserver/request', async ([seq, command, args]) => {
116-
const res = await vscode.commands.executeCommand<{ body: { result: unknown; }; } | undefined>(
132+
const res = await vscode.commands.executeCommand<{ body: { result: unknown } } | undefined>(
117133
'typescript.tsserverRequest',
118134
command,
119135
args,
@@ -144,9 +160,11 @@ try {
144160
'languages:Array.isArray(e.languages)',
145161
[
146162
'languages:',
147-
`e.name==='vue-typescript-plugin-pack'?[${config.server.includeLanguages
148-
.map(lang => `'${lang}'`)
149-
.join(',')}]`,
163+
`e.name==='vue-typescript-plugin-pack'?[${
164+
config.server.includeLanguages
165+
.map(lang => `'${lang}'`)
166+
.join(',')
167+
}]`,
150168
':Array.isArray(e.languages)',
151169
].join(''),
152170
);
@@ -177,4 +195,4 @@ try {
177195
if (tsExtension.isActive) {
178196
vscode.commands.executeCommand('workbench.action.restartExtensionHost');
179197
}
180-
} catch { }
198+
} catch {}

extensions/vscode/languages/markdown-language-configuration.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@
5151
[
5252
"{{",
5353
"}}"
54-
],
54+
]
5555
]
56-
}
56+
}

extensions/vscode/languages/sfc-template-language-configuration.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
[
44
"{{",
55
"}}"
6-
],
6+
]
77
]
8-
}
8+
}

extensions/vscode/languages/vue-language-configuration.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
[
102102
"`",
103103
"`"
104-
],
104+
]
105105
],
106106
"colorizedBracketPairs": [],
107107
"folding": {
@@ -142,4 +142,4 @@
142142
"increaseIndentPattern": "<(?!\\?|(?:area|base|br|col|frame|hr|html|img|input|keygen|link|menuitem|meta|param|source|track|wbr|script|style)\\b|[^>]*\\/>)([-_\\.A-Za-z0-9]+)(?=\\s|>)\\b[^>]*>(?!\\s*\\()(?!.*<\\/\\1>)|<!--(?!.*-->)|\\{[^}\"']*$",
143143
"decreaseIndentPattern": "^\\s*(<\\/(?!html)[-_\\.A-Za-z0-9]+\\b[^>]*>|-->|\\})"
144144
}
145-
}
145+
}

0 commit comments

Comments
 (0)