Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Shougo committed Jul 27, 2024
1 parent 06fd98d commit 2172cdc
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 41 deletions.
5 changes: 3 additions & 2 deletions deno.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
},
"publish": {
"include": [
"denops/ddc/**/*.ts",
],
"denops/ddc/**/*.ts"
]
},
"imports": {
},
"lock": false,
"tasks": {
"check": "deno check denops/**/*.ts",
"lint": "deno lint denops",
"lint-fix": "deno lint --fix denops",
"fmt": "deno fmt denops",
"test": "deno test -A --doc --parallel --shuffle denops/**/*.ts",
"upgrade": "deno run -A jsr:@molt/cli **/*.ts --no-resolve --write"
Expand Down
9 changes: 6 additions & 3 deletions denops/@ddu-sources/ddc.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { Context, Item } from "https://deno.land/x/ddu_vim@v4.1.1/types.ts";
import type {
Context,
Item,
} from "https://deno.land/x/ddu_vim@v4.1.1/types.ts";
import { BaseSource } from "https://deno.land/x/ddu_vim@v4.1.1/base/source.ts";
import { Denops, vars } from "https://deno.land/x/ddu_vim@v4.1.1/deps.ts";
import { DdcItem } from "../ddc/types.ts";
import { type Denops, vars } from "https://deno.land/x/ddu_vim@v4.1.1/deps.ts";
import type { DdcItem } from "../ddc/types.ts";

type Params = Record<string, never>;

Expand Down
8 changes: 4 additions & 4 deletions denops/ddc/app.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Ddc } from "./ddc.ts";
import { ContextBuilder, ContextCallbacks } from "./context.ts";
import {
import { ContextBuilder, type ContextCallbacks } from "./context.ts";
import type {
DdcEvent,
DdcExtType,
DdcItem,
Expand All @@ -11,9 +11,9 @@ import {
UserOptions,
} from "./types.ts";
import {
Denops,
type Denops,
ensure,
Entrypoint,
type Entrypoint,
is,
Lock,
toFileUrl,
Expand Down
6 changes: 3 additions & 3 deletions denops/ddc/base/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ContextBuilder } from "../context.ts";
import { DdcExtType } from "../types.ts";
import { Denops } from "../deps.ts";
import type { ContextBuilder } from "../context.ts";
import type { DdcExtType } from "../types.ts";
import type { Denops } from "../deps.ts";

export type ConfigArguments = {
denops: Denops;
Expand Down
4 changes: 2 additions & 2 deletions denops/ddc/base/filter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
Context,
DdcEvent,
DdcOptions,
Expand All @@ -7,7 +7,7 @@ import {
OnCallback,
SourceOptions,
} from "../types.ts";
import { Denops } from "../deps.ts";
import type { Denops } from "../deps.ts";

export type BaseFilterParams = Record<string, unknown>;

Expand Down
6 changes: 3 additions & 3 deletions denops/ddc/base/source.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
Context,
DdcEvent,
DdcGatherItems,
Expand All @@ -9,9 +9,9 @@ import {
Previewer,
SourceOptions,
} from "../types.ts";
import { Denops } from "../deps.ts";
import type { Denops } from "../deps.ts";
import { convertKeywordPattern } from "../utils.ts";
import { Loader } from "../loader.ts";
import type { Loader } from "../loader.ts";

export type BaseSourceParams = Record<string, unknown>;

Expand Down
4 changes: 2 additions & 2 deletions denops/ddc/base/ui.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Context, DdcItem, DdcOptions, UiOptions } from "../types.ts";
import { Denops } from "../deps.ts";
import type { Context, DdcItem, DdcOptions, UiOptions } from "../types.ts";
import type { Denops } from "../deps.ts";

export type BaseUiParams = Record<string, unknown>;

Expand Down
2 changes: 1 addition & 1 deletion denops/ddc/callback.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { assertEquals, spy } from "./deps.ts";
import { CallbackContext } from "./types.ts";
import type { CallbackContext } from "./types.ts";

class DdcCallbackCancelError extends Error {
constructor(message?: string) {
Expand Down
4 changes: 2 additions & 2 deletions denops/ddc/context.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import {
assertEquals,
collect,
Denops,
type Denops,
ensure,
fn,
is,
op,
vars,
vimOp,
} from "./deps.ts";
import {
import type {
BaseFilterParams,
BaseSourceParams,
BaseUiParams,
Expand Down
6 changes: 3 additions & 3 deletions denops/ddc/ddc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import {
assertEquals,
autocmd,
batch,
Denops,
type Denops,
equal,
fn,
op,
vars,
} from "./deps.ts";
import {
import type {
BaseUi,
BaseUiParams,
CallbackContext,
Expand All @@ -23,7 +23,7 @@ import {
UserSource,
} from "./types.ts";
import { defaultDummy } from "./context.ts";
import { Loader } from "./loader.ts";
import type { Loader } from "./loader.ts";
import { defaultUiOptions } from "./base/ui.ts";
import { defaultSourceOptions } from "./base/source.ts";
import {
Expand Down
8 changes: 4 additions & 4 deletions denops/ddc/ext.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { deadline, Denops } from "./deps.ts";
import {
import { deadline, type Denops } from "./deps.ts";
import type {
BaseFilter,
BaseFilterParams,
BaseSource,
Expand Down Expand Up @@ -32,8 +32,8 @@ import {
mergeUiOptions,
mergeUiParams,
} from "./context.ts";
import { Loader } from "./loader.ts";
import { Ddc } from "./ddc.ts";
import type { Loader } from "./loader.ts";
import type { Ddc } from "./ddc.ts";
import { isDdcCallbackCancelError } from "./callback.ts";
import { defaultUiOptions } from "./base/ui.ts";
import { defaultSourceOptions } from "./base/source.ts";
Expand Down
14 changes: 7 additions & 7 deletions denops/ddc/loader.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
BaseFilter,
BaseFilterParams,
BaseSource,
Expand All @@ -12,7 +12,7 @@ import {
} from "./types.ts";
import {
basename,
Denops,
type Denops,
fn,
is,
Lock,
Expand Down Expand Up @@ -113,19 +113,19 @@ export class Loader {
});
}

getAliasNames(type: DdcExtType) {
getAliasNames(type: DdcExtType): string[] {
return Object.keys(this.#aliases[type]);
}
getAlias(type: DdcExtType, name: string) {
getAlias(type: DdcExtType, name: string): string {
return this.#aliases[type][name];
}
getUi(name: UiName) {
getUi(name: UiName): BaseUi<BaseUiParams> {
return this.#uis[name];
}
getSource(name: SourceName) {
getSource(name: SourceName): BaseSource<BaseSourceParams> {
return this.#sources[name];
}
getFilter(name: FilterName) {
getFilter(name: FilterName): BaseFilter<BaseUiParams> {
return this.#filters[name];
}

Expand Down
8 changes: 4 additions & 4 deletions denops/ddc/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { autocmd } from "./deps.ts";
import { BaseUiParams } from "./base/ui.ts";
import { BaseSourceParams } from "./base/source.ts";
import { BaseFilterParams } from "./base/filter.ts";
import type { autocmd } from "./deps.ts";
import type { BaseUiParams } from "./base/ui.ts";
import type { BaseSourceParams } from "./base/source.ts";
import type { BaseFilterParams } from "./base/filter.ts";

export { BaseConfig } from "./base/config.ts";
export { BaseUi } from "./base/ui.ts";
Expand Down
2 changes: 1 addition & 1 deletion denops/ddc/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { assertEquals, Denops, op } from "./deps.ts";
import { assertEquals, type Denops, op } from "./deps.ts";

export async function convertKeywordPattern(
denops: Denops,
Expand Down

0 comments on commit 2172cdc

Please sign in to comment.