Skip to content

Commit 1fdac06

Browse files
committed
bump
1 parent 2a07ac4 commit 1fdac06

8 files changed

Lines changed: 3258 additions & 12479 deletions

File tree

.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"printWidth": 120
3+
}

package-lock.json

Lines changed: 3188 additions & 12409 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@
1919
"type": "module",
2020
"main": "./dist/extension.js",
2121
"scripts": {
22-
"clean": "rimraf dist out",
23-
"tsc": "tsc -p ./",
24-
"type-check": "tsc --noEmit",
2522
"build": "rspack build --mode production",
26-
"watch": "rspack build --mode development --watch",
27-
"pretest": "rimraf dist && npm run type-check && npm run build",
28-
"test": "node ./tests/runTest.ts",
29-
"format": "prettier --check . --config package.json --ignore-path .prettierignore",
30-
"format:write": "prettier --write . --config package.json --ignore-path .prettierignore",
23+
"clean": "rimraf dist out",
24+
"fix": "run-s format:write lint:fix",
25+
"format": "prettier --check .",
26+
"format:write": "prettier --write .",
3127
"lint": "eslint",
3228
"lint:fix": "eslint --fix",
33-
"fix": "run-s format:write lint:fix",
29+
"prepackage": "npm run build",
30+
"package": "vsce package --no-dependencies",
3431
"sort": "sort-package-json",
32+
"pretest": "rimraf dist && npm run type-check && npm run build",
33+
"test": "node ./tests/runTest.ts",
34+
"tsc": "tsc -p ./",
35+
"type-check": "tsc --noEmit",
3536
"upgrade": "ncu -u",
36-
"prepackage": "npm run build",
37-
"package": "vsce package --no-dependencies"
37+
"watch": "rspack build --mode development --watch"
3838
},
3939
"contributes": {
4040
"commands": [
@@ -54,12 +54,6 @@
5454
"command": "textlint.showOutputChannel"
5555
}
5656
],
57-
"configurationDefaults": {
58-
"files.associations": {
59-
".textlintrc.json": "jsonc",
60-
".textlintignore": "ignore"
61-
}
62-
},
6357
"configuration": {
6458
"type": "object",
6559
"title": "textlint",
@@ -126,38 +120,44 @@
126120
"description": "Target files path that runs lint."
127121
}
128122
}
123+
},
124+
"configurationDefaults": {
125+
"files.associations": {
126+
".textlintrc.json": "jsonc",
127+
".textlintignore": "ignore"
128+
}
129129
}
130130
},
131131
"activationEvents": [
132132
"onLanguage"
133133
],
134134
"dependencies": {
135-
"minimatch": "^3.0.4",
135+
"minimatch": "^10.2.5",
136136
"vscode-languageclient": "^10.1.0",
137137
"vscode-languageserver": "^10.1.0",
138138
"vscode-languageserver-textdocument": "^1.0.12",
139139
"vscode-uri": "^3.1.0"
140140
},
141141
"devDependencies": {
142142
"@eslint/js": "^10.0.1",
143-
"@rspack/cli": "^2.1.1",
144-
"@rspack/core": "^2.1.1",
143+
"@rspack/cli": "^2.1.5",
144+
"@rspack/core": "^2.1.5",
145145
"@textlint/types": "^15.7.1",
146-
"@types/node": "^22.20.0",
147-
"@types/vscode": "^1.100.0",
148-
"@vscode/test-electron": "^3.0.0",
146+
"@types/node": "^26.1.1",
147+
"@types/vscode": "^1.125.0",
148+
"@vscode/test-electron": "^3.1.0",
149149
"@vscode/vsce": "^3.9.2",
150-
"eslint": "^10.5.0",
150+
"eslint": "^10.8.0",
151151
"eslint-config-prettier": "^10.1.8",
152-
"merge-options": "^3.0.4",
153-
"npm-check-updates": "^11.8.5",
154-
"npm-run-all": "^4.1.5",
155-
"prettier": "^2.4.1",
156-
"rimraf": "^3.0.2",
157-
"sort-package-json": "^1.52.0",
152+
"npm-check-updates": "^22.2.9",
153+
"npm-run-all2": "^9.0.2",
154+
"prettier": "^3.9.6",
155+
"rimraf": "^6.1.3",
156+
"sort-package-json": "^4.0.0",
158157
"typescript": "~6.0.3",
159-
"typescript-eslint": "^8.62.0"
158+
"typescript-eslint": "^8.65.0"
160159
},
160+
"packageManager": "npm@12.0.1+sha512.2f94fd8bf600416416a934bfc59c4991e8bff7372ef7d842784e2a8b8d48c81555ee645069ddea73625fb8e92dc261feab0188fd5dab6c22fefd46316f5f9140",
161161
"engines": {
162162
"node": ">=24.0.0 <25.0.0",
163163
"vscode": "^1.100.0"
@@ -166,8 +166,5 @@
166166
"galleryBanner": {
167167
"color": "#5acbe3",
168168
"theme": "light"
169-
},
170-
"prettier": {
171-
"printWidth": 120
172169
}
173170
}

src/client/extension.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import minimatch from "minimatch";
1+
import { minimatch } from "minimatch";
22

33
import {
44
workspace,
@@ -70,7 +70,7 @@ export async function activate(context: ExtensionContext): Promise<ExtensionInte
7070
statusBar.status.log(
7171
client,
7272
`No textlint configuration (e.g .textlintrc) found in ${p.workspaceFolder} .
73-
File will not be validated. Consider running the 'Create .textlintrc file' command.`
73+
File will not be validated. Consider running the 'Create .textlintrc file' command.`,
7474
);
7575
});
7676
client.onNotification(NoLibraryNotification.type, (p) => {
@@ -79,7 +79,7 @@ File will not be validated. Consider running the 'Create .textlintrc file' comma
7979
client,
8080
`Failed to load the textlint library in ${p.workspaceFolder} .
8181
To use textlint in this workspace please install textlint using 'npm install textlint' or globally using 'npm install -g textlint'.
82-
You need to reopen the workspace after installing textlint.`
82+
You need to reopen the workspace after installing textlint.`,
8383
);
8484
});
8585
client.onNotification(StartProgressNotification.type, () => statusBar.startProgress());
@@ -95,7 +95,7 @@ You need to reopen the workspace after installing textlint.`
9595
commands.registerCommand("textlint.executeAutofix", makeAutoFixFn(client)),
9696
commands.registerCommand("textlint.showOutputChannel", () => client.outputChannel.show()),
9797
client,
98-
statusBar
98+
statusBar,
9999
);
100100
await client.start();
101101
// for testing purpose
@@ -164,7 +164,7 @@ async function createConfig() {
164164
const folders = workspace.workspaceFolders;
165165
if (!folders) {
166166
await window.showErrorMessage(
167-
"An textlint configuration can only be generated if VS Code is opened on a workspace folder."
167+
"An textlint configuration can only be generated if VS Code is opened on a workspace folder.",
168168
);
169169
return;
170170
}
@@ -190,7 +190,7 @@ async function filterNoConfigFolders(folders: readonly WorkspaceFolder[]): Promi
190190
const result = [];
191191
outer: for (const folder of folders) {
192192
const candidates = ["", ".js", ".yaml", ".yml", ".json"].map((ext) =>
193-
URIUtils.joinPath(folder.uri, ".textlintrc" + ext)
193+
URIUtils.joinPath(folder.uri, ".textlintrc" + ext),
194194
);
195195
for (const configPath of candidates) {
196196
try {
@@ -213,8 +213,8 @@ async function emitConfig(folder: WorkspaceFolder) {
213213
"filters": {},
214214
"rules": {}
215215
}`,
216-
"utf8"
217-
)
216+
"utf8",
217+
),
218218
);
219219
}
220220
}
@@ -254,7 +254,7 @@ function configureAutoFixOnSave(client: LanguageClient) {
254254
return result && result.documentVersion === version
255255
? client.protocol2CodeConverter.asTextEdits(result.edits)
256256
: [];
257-
})
257+
}),
258258
);
259259
}
260260
});
@@ -281,7 +281,7 @@ function makeAutoFixFn(client: LanguageClient) {
281281
},
282282
(error) => {
283283
client.error("Failed to apply textlint fixes to the document.", error);
284-
}
284+
},
285285
);
286286
}
287287
};
@@ -308,7 +308,7 @@ async function applyTextEdits(
308308
client: LanguageClient,
309309
uri: string,
310310
documentVersion: number,
311-
edits: TextEdit[]
311+
edits: TextEdit[],
312312
): Promise<boolean> {
313313
const textEditor = window.activeTextEditor;
314314
if (textEditor && textEditor.document.uri.toString() === uri) {
@@ -326,7 +326,7 @@ async function applyTextEdits(
326326
(errors) => {
327327
client.error(errors.message, errors.stack);
328328
return false;
329-
}
329+
},
330330
);
331331
} else {
332332
window.showInformationMessage(`textlint fixes are outdated and can't be applied to ${uri}`);

src/client/status.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface Status {
1010
error(message: string, data?: unknown): void;
1111
},
1212
msg: string,
13-
data?: unknown
13+
data?: unknown,
1414
) => void;
1515
}
1616

src/server/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import * as os from "os";
2424
import * as fs from "fs";
2525
import * as path from "path";
2626
import { createRequire } from "node:module";
27-
import minimatch from "minimatch";
27+
import { minimatch } from "minimatch";
2828

2929
import {
3030
NoConfigNotification,
@@ -395,7 +395,7 @@ connection.onCodeAction((params) => {
395395
function toTextEdit(textDocument: TextDocument, af: AutoFix): TextEdit {
396396
return TextEdit.replace(
397397
Range.create(textDocument.positionAt(af.fix.range[0]), textDocument.positionAt(af.fix.range[1])),
398-
af.fix.text || ""
398+
af.fix.text || "",
399399
);
400400
}
401401

tests/suite/extension.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ checkedTest("Extension tests > Server integration > Linting", async (context) =>
197197
// Wait for diagnostics of the edited content; the didOpen lint publishes
198198
// diagnostics for the pre-edit content first
199199
const received = await waitForCondition(() =>
200-
diagnostics.some((diag) => diag.range.start.line === 0 && diag.range.start.character === 1)
200+
diagnostics.some((diag) => diag.range.start.line === 0 && diag.range.start.character === 1),
201201
);
202202
assert.ok(received, "Should receive diagnostics for the edited document within 10 seconds");
203203

@@ -239,7 +239,7 @@ checkedTest("Extension tests > Server integration > Linting", async (context) =>
239239
assert.strictEqual(
240240
diagnostics.length,
241241
expectedDiagnostics.length,
242-
"Number of diagnostics should match expected count"
242+
"Number of diagnostics should match expected count",
243243
);
244244

245245
// Verify each diagnostic
@@ -266,7 +266,7 @@ checkedTest("Extension tests > Server integration > Linting", async (context) =>
266266
endLine: expected.range.end.line,
267267
endChar: expected.range.end.character,
268268
},
269-
`Diagnostic[${i}] range should match expected values`
269+
`Diagnostic[${i}] range should match expected values`,
270270
);
271271
}
272272
});
@@ -331,22 +331,22 @@ checkedTest("Extension tests > Server integration > Autofix", async (context) =>
331331
assert.strictEqual(
332332
actual.range.start.line,
333333
expected.range.start.line,
334-
`Edit[${i}] range.start.line should match expected value`
334+
`Edit[${i}] range.start.line should match expected value`,
335335
);
336336
assert.strictEqual(
337337
actual.range.start.character,
338338
expected.range.start.character,
339-
`Edit[${i}] range.start.character should match expected value`
339+
`Edit[${i}] range.start.character should match expected value`,
340340
);
341341
assert.strictEqual(
342342
actual.range.end.line,
343343
expected.range.end.line,
344-
`Edit[${i}] range.end.line should match expected value`
344+
`Edit[${i}] range.end.line should match expected value`,
345345
);
346346
assert.strictEqual(
347347
actual.range.end.character,
348348
expected.range.end.character,
349-
`Edit[${i}] range.end.character should match expected value`
349+
`Edit[${i}] range.end.character should match expected value`,
350350
);
351351
}
352352
});

vscode-textlint.code-workspace

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
{
2-
"folders": [
3-
{
4-
"path": "."
5-
}
6-
],
7-
"settings": {
2+
"folders": [
3+
{
4+
"path": ".",
5+
},
6+
],
7+
"settings": {
88
"editor.formatOnSave": false,
99
"editor.codeActionsOnSave": {
10-
"source.fixAll.eslint": "explicit"
10+
"source.fixAll.eslint": "explicit",
1111
},
1212
"[json]": {
1313
"editor.defaultFormatter": "esbenp.prettier-vscode",
14-
"editor.formatOnSave": true
14+
"editor.formatOnSave": true,
1515
},
1616
"[javascript]": {
1717
"editor.defaultFormatter": "esbenp.prettier-vscode",
18-
"editor.formatOnSave": true
18+
"editor.formatOnSave": true,
1919
},
2020
"[typescript]": {
2121
"editor.defaultFormatter": "esbenp.prettier-vscode",
22-
"editor.formatOnSave": true
22+
"editor.formatOnSave": true,
2323
},
2424
"[typescriptreact]": {
2525
"editor.defaultFormatter": "esbenp.prettier-vscode",
26-
"editor.formatOnSave": true
26+
"editor.formatOnSave": true,
2727
},
2828
"typescript.tsdk": "./node_modules/typescript/lib",
29-
"npm.packageManager": "npm"
29+
"npm.packageManager": "npm",
3030
},
3131
"extensions": {
3232
"recommendations": [
3333
"amodio.tsl-problem-matcher",
3434
"dbaeumer.vscode-eslint",
3535
"editorconfig.editorconfig",
36-
"esbenp.prettier-vscode"
37-
]
36+
"esbenp.prettier-vscode",
37+
],
3838
},
3939
}

0 commit comments

Comments
 (0)