Skip to content

Commit

Permalink
Use default space-before-function-paren from eslint-config-standard
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisalmen committed Jun 21, 2022
1 parent 204f7d1 commit df05905
Show file tree
Hide file tree
Showing 9 changed files with 215 additions and 160 deletions.
5 changes: 0 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ module.exports = {
indent: ['error', 4, {
SwitchCase: 1
}],
'space-before-function-paren': ['error', {
anonymous: 'always',
named: 'never',
asyncArrow: 'always'
}],
semi: ['error', 'always'],
'no-extra-semi': 'off',
'@typescript-eslint/no-extra-semi': ['error'],
Expand Down
6 changes: 4 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
"editor.formatOnSave": false,
"workbench.editor.revealIfOpen": true,
"[javascript]": {
"editor.formatOnSave": true
"editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescript]": {
"editor.formatOnSave": true
"editor.formatOnSave": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"eslint.validate": [
"javascript",
Expand Down
108 changes: 83 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions packages/client/src/console-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import * as vscode from 'vscode';

export class ConsoleWindow implements Window {
protected readonly channels = new Map<string, vscode.OutputChannel>();
showMessage<T extends vscode.MessageOptions | string | vscode.MessageItem>(severity: Severity, message: string, ...actions: T[]): Thenable<T | undefined> {
showMessage<T extends vscode.MessageOptions | string | vscode.MessageItem> (severity: Severity, message: string, ...actions: T[]): Thenable<T | undefined> {
if (severity === Severity.Error) {
console.error(message);
}
Expand All @@ -23,23 +23,23 @@ export class ConsoleWindow implements Window {
return Promise.resolve(undefined);
}

createOutputChannel(name: string): vscode.OutputChannel {
createOutputChannel (name: string): vscode.OutputChannel {
const existing = this.channels.get(name);
if (existing) {
return existing;
}
const channel: vscode.OutputChannel = {
name: 'default',
append(value: string): void {
append (value: string): void {
console.log(name + ': ' + value);
},
appendLine(line: string): void {
appendLine (line: string): void {
console.log(name + ': ' + line);
},
show(): void {
show (): void {
// no-op
},
dispose(): void {
dispose (): void {
// no-op
},
replace: function (value: string): void {
Expand Down
6 changes: 3 additions & 3 deletions packages/client/src/disposable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import { Disposable } from 'vscode-jsonrpc';
export class DisposableCollection implements Disposable {
protected readonly disposables: Disposable[] = [];

dispose(): void {
dispose (): void {
while (this.disposables.length !== 0) {
this.disposables.pop()?.dispose();
}
}

push(disposable: Disposable): Disposable {
push (disposable: Disposable): Disposable {
const disposables = this.disposables;
disposables.push(disposable);
return {
dispose(): void {
dispose (): void {
const index = disposables.indexOf(disposable);
if (index !== -1) {
disposables.splice(index, 1);
Expand Down
Loading

0 comments on commit df05905

Please sign in to comment.