Skip to content

Commit

Permalink
chore: eslint automatically removes unused directives
Browse files Browse the repository at this point in the history
  • Loading branch information
mikavilpas committed Nov 17, 2024
1 parent e02f7f5 commit f67e2ab
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
ecmaVersion: 'latest',
sourceType: 'module',
},
reportUnusedDisableDirectives: true,
ignorePatterns: [
'.eslintrc.js',
'packages/*/lib/',
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# some tests seem to create these files in CI
nvim-win64
4 changes: 1 addition & 3 deletions packages/decorators/src/plugin/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,13 @@ function wrapper(cls: PluginWrapperConstructor, options?: PluginOptions): any {
}

// Can decorate a class with options object
// eslint-disable-next-line import/export

export function Plugin(
outter: any
): (cls: PluginWrapperConstructor, options?: PluginOptions) => any;

// eslint-disable-next-line import/export
export function Plugin(outter: any): any;

// eslint-disable-next-line import/export
export function Plugin(outter: any): any {
/**
* Decorator should support
Expand Down
22 changes: 11 additions & 11 deletions packages/neovim/src/api/Neovim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ import { ApiInfo } from '../types/ApiInfo';
export interface UiAttachOptions {
rgb?: boolean;
override?: boolean;
// eslint-disable-next-line camelcase

ext_cmdline?: boolean;
// eslint-disable-next-line camelcase

ext_hlstate?: boolean;
// eslint-disable-next-line camelcase

ext_linegrid?: boolean;
// eslint-disable-next-line camelcase

ext_messages?: boolean;
// eslint-disable-next-line camelcase

ext_multigrid?: boolean;
// eslint-disable-next-line camelcase

ext_popupmenu?: boolean;
// eslint-disable-next-line camelcase

ext_tabline?: boolean;
// eslint-disable-next-line camelcase

ext_wildmenu?: boolean;
// eslint-disable-next-line camelcase

ext_termcolors?: boolean;
}

Expand Down Expand Up @@ -56,7 +56,7 @@ export interface Command {
nargs: string;
range: string;
name: string;
// eslint-disable-next-line camelcase

script_id: number;
bar: boolean;
register: boolean;
Expand All @@ -65,7 +65,7 @@ export interface Command {
complete?: null;
addr?: any;
count?: any;
// eslint-disable-next-line camelcase

complete_arg?: any;
}

Expand Down
1 change: 0 additions & 1 deletion packages/neovim/src/api/utils/createChainableApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export function createChainableApi(
},

set: (target: any, prop: string, value: any, receiver: Promise<any>) => {
// eslint-disable-next-line no-param-reassign
if (receiver && (receiver instanceof Promise || 'then' in receiver)) {
receiver.then(obj => {
if (prop in obj) {
Expand Down
4 changes: 2 additions & 2 deletions packages/neovim/src/host/NvimPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface NvimPluginOptions {

export interface AutocmdOptions {
pattern?: string;
// eslint-disable-next-line no-eval

eval?: string;
sync?: boolean;
}
Expand All @@ -24,7 +24,7 @@ export interface CommandOptions {
export interface NvimFunctionOptions {
sync?: boolean;
range?: string;
// eslint-disable-next-line no-eval

eval?: string;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/neovim/src/plugin/autocmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NVIM_SYNC, NVIM_SPEC, NVIM_METHOD_NAME } from './properties';

export interface AutocmdOptions {
pattern: string;
// eslint-disable-next-line no-eval

eval?: string;
sync?: boolean;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/neovim/src/plugin/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { NVIM_SYNC, NVIM_SPEC, NVIM_METHOD_NAME } from './properties';
export interface NvimFunctionOptions {
sync?: boolean;
range?: [number, number];
// eslint-disable-next-line no-eval

eval?: string;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/neovim/src/types/Spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface Spec {
opts: {
range?: string;
nargs?: string;
// eslint-disable-next-line no-eval

eval?: string;
pattern?: string;
complete?: string;
Expand Down

0 comments on commit f67e2ab

Please sign in to comment.