Skip to content

Commit 7b2bfeb

Browse files
committed
Specifically disable @typescript-eslint/dot-notation
1 parent cb39f26 commit 7b2bfeb

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

.eslintrc.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ module.exports = {
1212
parser: '@typescript-eslint/parser',
1313
parserOptions: {
1414
ecmaVersion: '2020',
15-
sourceType: 'module'
15+
sourceType: 'module',
16+
project: './tsconfig.json'
1617
},
1718
plugins: [
1819
'@typescript-eslint',
@@ -40,7 +41,9 @@ module.exports = {
4041
'@typescript-eslint/no-unused-vars': ['warn', {
4142
argsIgnorePattern: '^_'
4243
}],
43-
'header/header': [2, headerDef]
44+
'header/header': [2, headerDef],
45+
'dot-notation': 'off',
46+
'@typescript-eslint/dot-notation': ['error']
4447
},
4548
ignorePatterns: ['.eslintrc.js', './packages/examples/browser-lsp/src/serverWorker.ts']
4649
};

packages/client/src/disposable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class DisposableCollection implements Disposable {
1010

1111
dispose (): void {
1212
while (this.disposables.length !== 0) {
13-
this.disposables.pop()?.dispose();
13+
this.disposables.pop()!.dispose();
1414
}
1515
}
1616

packages/client/src/monaco-language-client.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
* ------------------------------------------------------------------------------------------ */
55

6-
/* eslint-disable dot-notation */
7-
86
import {
97
BaseLanguageClient, MessageTransports, LanguageClientOptions, CloseAction, ErrorAction
108
} from 'vscode-languageclient/lib/common/client';
@@ -54,14 +52,18 @@ export class MonacoLanguageClient extends BaseLanguageClient {
5452

5553
// Hack because vscode-language client rejects the whole registration block if one capability registration has no associated client feature registered
5654
// Some language servers still send the registration even though the client says it doesn't support it
55+
// eslint-disable-next-line @typescript-eslint/dot-notation
5756
const originalHandleRegistrationRequest: (params: RegistrationParams) => Promise<void> = this['handleRegistrationRequest'].bind(this);
57+
// eslint-disable-next-line @typescript-eslint/dot-notation
5858
this['handleRegistrationRequest'] = (params: RegistrationParams) => {
5959
originalHandleRegistrationRequest({
6060
...params,
6161
registrations: params.registrations.filter(registration => this.getFeature(<any>registration.method) != null)
6262
});
6363
};
64+
// eslint-disable-next-line @typescript-eslint/dot-notation
6465
const originalHandleUnregistrationRequest: (params: UnregistrationParams) => Promise<void> = this['handleUnregistrationRequest'].bind(this);
66+
// eslint-disable-next-line @typescript-eslint/dot-notation
6567
this['handleUnregistrationRequest'] = (params: UnregistrationParams) => {
6668
originalHandleUnregistrationRequest({
6769
...params,
@@ -79,8 +81,10 @@ export class MonacoLanguageClient extends BaseLanguageClient {
7981
}
8082

8183
protected override registerBuiltinFeatures () {
84+
// eslint-disable-next-line @typescript-eslint/dot-notation
8285
this.registerFeature(new DidOpenTextDocumentFeature(this, this['_syncedDocuments']));
8386
this.registerFeature(new DidChangeTextDocumentFeature(this));
87+
// eslint-disable-next-line @typescript-eslint/dot-notation
8488
this.registerFeature(new DidCloseTextDocumentFeature(this, this['_syncedDocuments']));
8589
this.registerFeature(new CompletionItemFeature(this));
8690
this.registerFeature(new HoverFeature(this));

0 commit comments

Comments
 (0)