Skip to content

Commit 374bd7a

Browse files
feat(lint): update tsslint config (#5602)
Co-authored-by: KazariEX <[email protected]>
1 parent f424ff7 commit 374bd7a

File tree

7 files changed

+301
-536
lines changed

7 files changed

+301
-536
lines changed

.oxlintrc.json

Lines changed: 0 additions & 11 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@
1212
"test": "vitest run",
1313
"test:update": "vitest run --update",
1414
"format": "dprint fmt",
15-
"lint": "pnpm run oxlint && pnpm run tsslint",
16-
"lint:fix": "pnpm run oxlint:fix && pnpm run tsslint:fix && npm run format",
17-
"oxlint": "oxlint",
18-
"oxlint:fix": "oxlint --fix",
19-
"tsslint": "tsslint --project {tsconfig.json,packages/*/tsconfig.json,extensions/*/tsconfig.json}",
20-
"tsslint:fix": "pnpm run lint -- --fix"
15+
"lint": "tsslint --project {tsconfig.json,packages/*/tsconfig.json,extensions/*/tsconfig.json}",
16+
"lint:fix": "pnpm run lint -- --fix"
2117
},
2218
"devDependencies": {
2319
"@lerna-lite/cli": "^4.1.2",
@@ -27,7 +23,6 @@
2723
"@tsslint/eslint": "^2.0.1",
2824
"@typescript-eslint/eslint-plugin": "^8.19.0",
2925
"dprint": "^0.50.0",
30-
"oxlint": "^1.0.0",
3126
"typescript": "latest",
3227
"vitest": "^3.1.3"
3328
}

packages/language-core/lib/codegen/script/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function* generateComponent(
6868
yield `})`;
6969
}
7070

71-
export function* generateComponentSetupReturns(scriptSetupRanges: ScriptSetupRanges): Generator<Code> {
71+
export function* generateComponentSetupReturns(scriptSetupRanges: ScriptSetupRanges): Generator<string> {
7272
// fill $props
7373
if (scriptSetupRanges.defineProps) {
7474
const name = scriptSetupRanges.defineProps.name ?? `__VLS_props`;

packages/language-server/tests/inlayHints.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,8 @@ async function requestInlayHintsResult(fileName: string, languageId: string, con
255255
let text = document.getText();
256256
for (const hint of inlayHints!.sort((a, b) => document.offsetAt(b.position) - document.offsetAt(a.position))) {
257257
const offset = document.offsetAt(hint.position);
258-
text = text.slice(0, offset) + '/* ' + hint.label + ' */' + text.slice(offset);
258+
const label = Array.isArray(hint.label) ? hint.label.map(part => part.value).join('') : hint.label;
259+
text = text.slice(0, offset) + '/* ' + label + ' */' + text.slice(offset);
259260
}
260261

261262
return text;

packages/language-service/lib/data.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export function loadTemplateData(lang: string) {
4040

4141
resolveReferences(data);
4242

43-
// oxlint-disable-next-line no-useless-spread
4443
for (const attr of [...data.globalAttributes ?? []]) {
4544
if (!attr.name.startsWith('v-')) {
4645
data.globalAttributes?.push(

0 commit comments

Comments
 (0)