Skip to content

Commit

Permalink
Merge pull request #4725 from Tyriar/no_useless_ctor
Browse files Browse the repository at this point in the history
Warn on eslint rule @typescript-eslint/no-useless-constructor
  • Loading branch information
Tyriar committed Aug 24, 2023
2 parents 0e3db59 + 1968e8c commit 2835976
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 14 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
{ "selector": "typeLike", "format": ["PascalCase"] },
{ "selector": "interface", "format": ["PascalCase"], "prefix": ["I"] }
],
"@typescript-eslint/no-useless-constructor": "warn",
"@typescript-eslint/prefer-namespace-keyword": "warn",
"@typescript-eslint/type-annotation-spacing": "warn",
"@typescript-eslint/quotes": [
Expand Down
2 changes: 0 additions & 2 deletions addons/xterm-addon-fit/src/FitAddon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ const MINIMUM_ROWS = 1;
export class FitAddon implements ITerminalAddon {
private _terminal: Terminal | undefined;

constructor() {}

public activate(terminal: Terminal): void {
this._terminal = terminal;
}
Expand Down
2 changes: 0 additions & 2 deletions addons/xterm-addon-serialize/src/SerializeAddon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,6 @@ class StringSerializeHandler extends BaseSerializeHandler {
export class SerializeAddon implements ITerminalAddon {
private _terminal: Terminal | undefined;

constructor() { }

public activate(terminal: Terminal): void {
this._terminal = terminal;
}
Expand Down
4 changes: 0 additions & 4 deletions src/browser/Linkifier2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ import { MockBufferService } from 'common/TestUtils.test';
import { ILink } from 'browser/Types';

class TestLinkifier2 extends Linkifier2 {
constructor(bufferService: IBufferService) {
super(bufferService);
}

public set currentLink(link: any) {
this._currentLink = link;
}
Expand Down
3 changes: 0 additions & 3 deletions src/common/Lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ export abstract class Disposable implements IDisposable {
protected _disposables: IDisposable[] = [];
protected _isDisposed: boolean = false;

constructor() {
}

/**
* Disposes the object, triggering the `dispose` method on all registered IDisposables.
*/
Expand Down
3 changes: 0 additions & 3 deletions src/common/public/AddonManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ export interface ILoadedAddon {
export class AddonManager implements IDisposable {
protected _addons: ILoadedAddon[] = [];

constructor() {
}

public dispose(): void {
for (let i = this._addons.length - 1; i >= 0; i--) {
this._addons[i].instance.dispose();
Expand Down

0 comments on commit 2835976

Please sign in to comment.