Skip to content

Commit

Permalink
lint: use johnsoncodehk/tsslint-config
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Nov 5, 2024
1 parent f3962cd commit 48e49ea
Show file tree
Hide file tree
Showing 6 changed files with 266 additions and 707 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"@lerna-lite/cli": "latest",
"@lerna-lite/publish": "latest",
"@tsslint/cli": "latest",
"@tsslint/config": "latest",
"typescript": "latest",
"vite": "latest",
"vitest": "latest"
Expand Down
6 changes: 3 additions & 3 deletions packages/language-server/lib/features/languageFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,12 +249,12 @@ export function register(
if (languageServicePlugins.some(({ capabilities }) => capabilities.workspaceSymbolProvider?.resolveProvider)) {
serverCapabilities.workspaceSymbolProvider.resolveProvider = true;
server.connection.onWorkspaceSymbolResolve(async (symbol, token) => {
const languageServiceId = (symbol.data as any)?.languageServiceId;
const languageServiceId = symbol.data?.languageServiceId;
const languageService = languageServiceById.get(languageServiceId)?.deref();
if (!languageService) {
return symbol;
}
symbol.data = (symbol.data as any)?.originalData;
symbol.data = symbol.data?.originalData;
return await languageService.resolveWorkspaceSymbol?.(symbol, token);
});
}
Expand Down Expand Up @@ -444,7 +444,7 @@ export function register(
let codeActions = await languageService.getCodeActions(uri, params.range, params.context, token) ?? [];
for (const codeAction of codeActions) {
if (codeAction.data && typeof codeAction.data === 'object') {
(codeAction.data as any).uri = params.textDocument.uri;
codeAction.data.uri = params.textDocument.uri;
}
else {
codeAction.data = { uri: params.textDocument.uri };
Expand Down
4 changes: 3 additions & 1 deletion packages/monaco/lib/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,9 @@ export function activateAutoInsertion(
const codeEditor = editor.getEditors().find(e => e.getModel() === model);
if (codeEditor && edit && model.getVersionId() === version) {
if (typeof edit === 'string') {
(codeEditor?.getContribution('snippetController2') as any)?.insert(edit);
codeEditor?.getContribution('snippetController2')
// @ts-expect-error
?.insert(edit);
}
else {
model.pushEditOperations([], [toTextEdit(edit)], () => []);
Expand Down
2 changes: 1 addition & 1 deletion packages/source-map/lib/sourceMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class SourceMap<Data = unknown> {

const mapped = translateOffset(offset, mapping[fromRange], mapping[toRange], getLengths(mapping, fromRange), getLengths(mapping, toRange));
if (mapped !== undefined) {
yield [mapped, mapping as Mapping<Data>] as const;
yield [mapped, mapping] as const;
}
}
}
Expand Down
Loading

0 comments on commit 48e49ea

Please sign in to comment.