Archived
1
0

Remove block padding (blank lines)

Also made a rule for it.
This commit is contained in:
Asher
2019-02-05 18:08:48 -06:00
parent dc08df5540
commit e770920be0
43 changed files with 108 additions and 189 deletions

View File

@ -26,7 +26,6 @@ import { ServiceCollection } from "vs/platform/instantiation/common/serviceColle
import { RawContextKey, IContextKeyService } from "vs/platform/contextkey/common/contextkey";
export class Client extends IDEClient {
private readonly windowId = parseInt(new Date().toISOString().replace(/[-:.TZ]/g, ""), 10);
private _serviceCollection: ServiceCollection | undefined;
private _clipboardContextKey: RawContextKey<boolean> | undefined;
@ -192,7 +191,6 @@ export class Client extends IDEClient {
this.clipboard.initialize();
}, this.initData, pathSets);
}
}
export const client = new Client();

View File

@ -6,7 +6,6 @@ import { IDecorationRenderOptions } from "vs/editor/common/editorCommon";
* This converts icon paths for decorations to the correct URL.
*/
abstract class CodeEditorServiceImpl extends editor.CodeEditorServiceImpl {
public registerDecorationType(key: string, options: IDecorationRenderOptions, parentTypeKey?: string): void {
super.registerDecorationType(key, options ? {
...options,
@ -18,7 +17,6 @@ abstract class CodeEditorServiceImpl extends editor.CodeEditorServiceImpl {
} :options.gutterIconPath,
} : {}, parentTypeKey);
}
}
const target = editor as typeof editor;

View File

@ -2,11 +2,9 @@ import * as paths from "./paths";
import * as environment from "vs/platform/environment/node/environmentService";
export class EnvironmentService extends environment.EnvironmentService {
public get sharedIPCHandle(): string {
return paths._paths.socketPath || super.sharedIPCHandle;
}
}
const target = environment as typeof environment;

View File

@ -2,7 +2,6 @@ import * as iconv from "../../node_modules/iconv-lite";
import { Transform, TransformCallback } from "stream";
class IconvLiteDecoderStream extends Transform {
// tslint:disable-next-line no-any
private conv: any;
private encoding: string;

View File

@ -4,7 +4,6 @@ import * as mouse from "vs/base/browser/mouseEvent";
* Fix the wheel event for Firefox.
*/
class StandardWheelEvent extends mouse.StandardWheelEvent {
public constructor(event: mouse.IMouseWheelEvent | null) {
super(
event,
@ -12,7 +11,6 @@ class StandardWheelEvent extends mouse.StandardWheelEvent {
(-(event as any as MouseWheelEvent).deltaY || 0) / 3, // tslint:disable-line no-any
);
}
}
const target = mouse as typeof mouse;

View File

@ -1,5 +1,4 @@
class NativeKeymap {
public getCurrentKeyboardLayout(): null {
return null;
}
@ -7,7 +6,6 @@ class NativeKeymap {
public getKeyMap(): undefined[] {
return [];
}
}
export = new NativeKeymap();

View File

@ -1,9 +1,7 @@
class Watchdog {
public start(): void {
// No action required.
}
}
export = new Watchdog();

View File

@ -9,7 +9,6 @@ type nodePtyType = typeof nodePty;
* Implementation of nodePty for the browser.
*/
class Pty implements nodePty.IPty {
private readonly emitter: EventEmitter;
private readonly cp: ChildProcess;
@ -54,15 +53,12 @@ class Pty implements nodePty.IPty {
public kill(signal?: string): void {
this.emitter.emit("kill", signal);
}
}
const ptyType: nodePtyType = {
spawn: (file: string, args: string[] | string, options: nodePty.IPtyForkOptions): nodePty.IPty => {
return new Pty(file, args, options);
},
};
module.exports = ptyType;

View File

@ -13,7 +13,6 @@ const getLabel = (key: string, enabled: boolean): string => {
};
export class PasteAction extends Action {
private static readonly KEY = "paste";
public constructor() {
@ -30,11 +29,9 @@ export class PasteAction extends Action {
this.enabled = enabled;
});
}
}
class TerminalPasteAction extends Action {
private static readonly KEY = "workbench.action.terminal.paste";
public static readonly ID = TERMINAL_COMMAND_ID.PASTE;
@ -61,11 +58,9 @@ class TerminalPasteAction extends Action {
return Promise.resolve();
}
}
class TerminalInstance extends instance.TerminalInstance {
public async paste(): Promise<void> {
this.focus();
if (clipboard.isEnabled) {
@ -75,7 +70,6 @@ class TerminalInstance extends instance.TerminalInstance {
document.execCommand("paste");
}
}
}
const actionsTarget = actions as typeof actions;

View File

@ -9,7 +9,6 @@ import { escapePath } from "@coder/protocol";
// use that for the logging. Or maybe create an instance when the server starts,
// and just always use that one (make it part of the protocol).
export class RotatingLogger implements NodeRotatingLogger {
private format = true;
private buffer = "";
private flushPromise: Promise<void> | undefined;
@ -178,7 +177,6 @@ export class RotatingLogger implements NodeRotatingLogger {
await this.rotate();
}
}
}
export const setAsyncMode = (): void => {

View File

@ -4,7 +4,6 @@ import { IpcRenderer } from "electron";
export * from "@coder/ide/src/fill/electron";
class StdioIpcRenderer extends StdioIpcHandler implements IpcRenderer {
public sendTo(windowId: number, channel: string, ...args: any[]): void {
throw new Error("Method not implemented.");
}
@ -16,7 +15,6 @@ class StdioIpcRenderer extends StdioIpcHandler implements IpcRenderer {
public eventNames(): string[] {
return super.eventNames() as string[];
}
}
export const ipcRenderer = new StdioIpcRenderer();

View File

@ -9,7 +9,6 @@ import * as paths from "./paths";
import { logger, field } from "@coder/logger";
class StorageDatabase implements workspaceStorage.IStorageDatabase {
public readonly onDidChangeItemsExternal = Event.None;
private items = new Map<string, string>();
private fetched: boolean = false;
@ -78,11 +77,9 @@ class StorageDatabase implements workspaceStorage.IStorageDatabase {
return promisify(writeFile)(this.path, JSON.stringify(json));
}
}
class GlobalStorageDatabase extends StorageDatabase implements IDisposable {
public constructor() {
super(path.join(paths.getAppDataPath(), "globalStorage", "state.vscdb"));
}
@ -90,7 +87,6 @@ class GlobalStorageDatabase extends StorageDatabase implements IDisposable {
public dispose(): void {
// Nothing to do.
}
}
const workspaceTarget = workspaceStorage as typeof workspaceStorage;

View File

@ -14,7 +14,6 @@ import { client } from "../client";
* the client. This setup means we can only control the current window.
*/
class WindowsService implements IWindowsService {
// tslint:disable-next-line no-any
public _serviceBrand: any;
@ -278,7 +277,6 @@ class WindowsService implements IWindowsService {
private getWindowById(_windowId: number): electron.BrowserWindow {
return this.window;
}
}
const target = windowsIpc as typeof windowsIpc;