xo: Enable @typescript-eslint/member-ordering.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg
2020-04-25 17:11:51 -07:00
committed by Anders Kaseorg
parent 963c2e5388
commit 39c6fa4ace
5 changed files with 16 additions and 16 deletions

View File

@@ -2,6 +2,12 @@ import Tab, { TabProps } from './tab';
export default class FunctionalTab extends Tab {
$closeButton: Element;
constructor(props: TabProps) {
super(props);
this.init();
}
template(): string {
return `<div class="tab functional-tab" data-tab-id="${this.props.tabIndex}">
<div class="server-tab-badge close-button">
@@ -13,11 +19,6 @@ export default class FunctionalTab extends Tab {
</div>`;
}
constructor(props: TabProps) {
super(props);
this.init();
}
init(): void {
this.$el = this.generateNodeFromTemplate(this.template());
if (this.props.name !== 'Settings') {

View File

@@ -6,6 +6,11 @@ import * as SystemUtil from '../utils/system-util';
export default class ServerTab extends Tab {
$badge: Element;
constructor(props: TabProps) {
super(props);
this.init();
}
template(): string {
return `<div class="tab" data-tab-id="${this.props.tabIndex}">
<div class="server-tooltip" style="display:none">${this.props.name}</div>
@@ -17,11 +22,6 @@ export default class ServerTab extends Tab {
</div>`;
}
constructor(props: TabProps) {
super(props);
this.init();
}
init(): void {
this.$el = this.generateNodeFromTemplate(this.template());
this.props.$root.append(this.$el);

View File

@@ -28,6 +28,10 @@ interface WebViewProps {
}
export default class WebView extends BaseComponent {
// This is required because in main.js we access WebView.method as
// webview[method].
[key: string]: any;
props: WebViewProps;
zoomFactor: number;
badgeCount: number;
@@ -37,10 +41,6 @@ export default class WebView extends BaseComponent {
$el: Electron.WebviewTag;
domReady?: Promise<void>;
// This is required because in main.js we access WebView.method as
// webview[method].
[key: string]: any;
constructor(props: WebViewProps) {
super();

View File

@@ -45,11 +45,11 @@ const browserConsole: PatchedConsole = console;
const logDir = `${app.getPath('userData')}/Logs`;
export default class Logger {
[key: string]: any;
nodeConsole: PatchedConsole;
timestamp?: () => string;
level: boolean;
logInDevMode: boolean;
[key: string]: any;
constructor(options: LoggerOptions = {}) {
let {

View File

@@ -202,7 +202,6 @@
},
"xo": {
"rules": {
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/prefer-readonly-parameter-types": "off",