Skip to content

Commit c2066d9

Browse files
committed
chore: eslint fix rest
1 parent 07f6760 commit c2066d9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lib/datatip-manager.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ export class DataTipManager {
282282
// means the mouse event occured quite far away from where the text ends on that row. Do not
283283
// show the datatip in such situations and hide any existing datatips (the mouse moved more to
284284
// the right, away from the actual text)
285+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
285286
// @ts-ignore: internal API
286287
if (distance >= this.editor.getDefaultCharWidth()) {
287288
return this.unmountDataTip()
@@ -327,6 +328,8 @@ export class DataTipManager {
327328
try {
328329
let datatip: Datatip | null = null
329330
for (const provider of this.providerRegistry.getAllProvidersForEditor(editor)) {
331+
// we only need one and we want to process them synchronously
332+
// eslint-disable-next-line no-await-in-loop
330333
const providerTip = await provider.datatip(editor, position)
331334
if (providerTip) {
332335
datatip = providerTip

lib/main.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ let datatipManager: DataTipManager
1616
/**
1717
* called by Atom when activating an extension
1818
*/
19-
export async function activate() {
19+
export function activate() {
2020
// Events subscribed to in atom's system can be easily cleaned up with a CompositeDisposable
2121
subscriptions = new CompositeDisposable()
22-
if (!datatipManager) datatipManager = new DataTipManager()
22+
if (!datatipManager) {
23+
datatipManager = new DataTipManager()
24+
}
2325
subscriptions.add(datatipManager)
2426

2527
install_deps().then(() => {
@@ -31,7 +33,6 @@ async function install_deps() {
3133
// install package-deps if not loaded
3234
if (!atom.packages.isPackageLoaded("busy-signal")) {
3335
// Dynamic import https://mariusschulz.com/blog/dynamic-import-expressions-in-typescript
34-
// @ts-ignore
3536
await import("atom-package-deps").then((atom_package_deps) => {
3637
atom_package_deps.install("atom-ide-datatip", true)
3738
})

0 commit comments

Comments
 (0)