Skip to content

Commit 523fe3f

Browse files
committed
don't lint dist, restore ts-ignore and interface-name (with grandfathered usage)
1 parent b47bfd6 commit 523fe3f

File tree

8 files changed

+17
-5
lines changed

8 files changed

+17
-5
lines changed

packages/.eslintrc.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,12 @@ module.exports = {
5757
'no-useless-escape': 'off',
5858
'prefer-const': 'off',
5959
// deviations from jupyterlab, should probably be fixed
60-
'jest/valid-expect': 'off',
60+
'@typescript-eslint/triple-slash-reference': 'off',
6161
'jest/no-test-callback': 'off',
62-
'@typescript-eslint/ban-ts-ignore': 'off',
63-
'react/display-name': 'off',
62+
'jest/valid-expect': 'off',
63+
'no-async-promise-executor': 'off',
6464
'prefer-spread': 'off',
65-
'@typescript-eslint/triple-slash-reference': 'off',
66-
'no-async-promise-executor': 'off'
65+
'react/display-name': 'off'
6766
},
6867
settings: {
6968
react: {

packages/jupyterlab-lsp/src/adapters/codemirror/feature.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ export abstract class CodeMirrorLSPFeature implements ILSPFeature {
163163
static readonly commands = new Array<IFeatureCommand>();
164164

165165
/* Just a safeguard to enforce static commands in sub-classes */
166+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
166167
// @ts-ignore
167168
private commands: any;
168169

packages/jupyterlab-lsp/src/adapters/jupyterlab/components/free_tooltip.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ interface IFreeTooltipOptions extends Tooltip.IOptions {
2222
/**
2323
* Tooltip which can be placed at any character, not only at the current position (derived from getCursorPosition)
2424
*/
25+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
2526
// @ts-ignore
2627
export class FreeTooltip extends Tooltip {
2728
position: CodeEditor.IPosition | null;
@@ -33,9 +34,11 @@ export class FreeTooltip extends Tooltip {
3334
this.movetoLineEnd = options.moveToLineEnd;
3435
}
3536

37+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
3638
// @ts-ignore
3739
private _setGeometry(): void {
3840
// Find the start of the current token for hover box placement.
41+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
3942
// @ts-ignore
4043
const editor = this._editor as CodeEditor.IEditor;
4144
const cursor: CodeEditor.IPosition =

packages/jupyterlab-lsp/src/adapters/jupyterlab/jl_adapter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ export abstract class JupyterLabWidgetAdapter
506506

507507
let { left, top } = leaf_node.getBoundingClientRect();
508508

509+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
509510
// @ts-ignore
510511
let event = this.app._contextMenuEvent;
511512

packages/jupyterlab-lsp/src/extractors/regexp.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,15 @@ export class RegExpForeignCodeExtractor implements IForeignCodeExtractor {
4242
let position_shift: CodeEditor.IPosition = null;
4343
let foreign_code_fragment = matched_string.replace(
4444
this.expression,
45+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
4546
// @ts-ignore
4647
this.options.extract_to_foreign
4748
);
4849
let prefix = '';
4950
if (typeof this.options.extract_arguments !== 'undefined') {
5051
prefix = matched_string.replace(
5152
this.expression,
53+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
5254
// @ts-ignore
5355
this.options.extract_arguments
5456
);

packages/jupyterlab-lsp/src/lsp.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export namespace DocumentHighlightKind {
4242
export function inverse_namespace(namespace: object): Record<number, string> {
4343
const records: Record<number, string> = {};
4444
for (let key of Object.keys(namespace)) {
45+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
4546
// @ts-ignore
4647
records[namespace[key]] = key;
4748
}

packages/jupyterlab-lsp/src/magics/maps.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ abstract class MagicsMap extends Map<RegExp, string | replacer> {
1010
protected _override_for(code: string): string | null {
1111
for (let [key, value] of this) {
1212
if (code.match(key)) {
13+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
1314
// @ts-ignore
1415
return code.replace(key, value);
1516
}

packages/jupyterlab-lsp/src/virtual/editors/notebook.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
IVirtualPosition
1212
} from '../../positioning';
1313

14+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
1415
// @ts-ignore
1516
class DocDispatcher implements CodeMirror.Doc {
1617
virtual_editor: VirtualEditorForNotebook;
@@ -185,8 +186,10 @@ export class VirtualEditorForNotebook extends VirtualEditor {
185186

186187
addPanel(
187188
node: HTMLElement,
189+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
188190
// @ts-ignore
189191
options?: CodeMirror.ShowPanelOptions
192+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
190193
// @ts-ignore
191194
): CodeMirror.Panel {
192195
return undefined;
@@ -269,6 +272,7 @@ export class VirtualEditorForNotebook extends VirtualEditor {
269272

270273
getDoc(): CodeMirror.Doc {
271274
let dummy_doc = new DocDispatcher(this);
275+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
272276
// @ts-ignore
273277
return dummy_doc;
274278
}

0 commit comments

Comments
 (0)