Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn on eslint rule @typescript-eslint/no-useless-constructor #4725

Merged
merged 2 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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