style: remove all tslint related comments (#934)
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
|
||||
These are the style guidelines for coding in Electron.
|
||||
|
||||
You can run `yarn lint` to show any style issues detected by `tslint` and
|
||||
`eslint`.
|
||||
You can run `yarn lint` to show any style issues detected by `eslint`.
|
||||
|
||||
## General Code
|
||||
|
||||
|
||||
@@ -97,7 +97,6 @@ describe('integration tests', function (this: ISuite) {
|
||||
it(title, async () => {
|
||||
const page: puppeteer.Page = await browser.newPage();
|
||||
// console for debug
|
||||
// tslint:disable-next-line: no-console
|
||||
page.on('console', (msg) => console.log(msg.text()));
|
||||
if (html.filePath === 'iframe.html') {
|
||||
// loading directly is needed to ensure we don't trigger compatMode='BackCompat'
|
||||
@@ -147,7 +146,6 @@ describe('integration tests', function (this: ISuite) {
|
||||
it('correctly triggers backCompat mode and rendering', async () => {
|
||||
const page: puppeteer.Page = await browser.newPage();
|
||||
// console for debug
|
||||
// tslint:disable-next-line: no-console
|
||||
page.on('console', (msg) => console.log(msg.text()));
|
||||
|
||||
await page.goto('http://localhost:3030/html/compat-mode.html', {
|
||||
@@ -244,7 +242,6 @@ describe('iframe integration tests', function (this: ISuite) {
|
||||
it('snapshot async iframes', async () => {
|
||||
const page: puppeteer.Page = await browser.newPage();
|
||||
// console for debug
|
||||
// tslint:disable-next-line: no-console
|
||||
page.on('console', (msg) => console.log(msg.text()));
|
||||
await page.goto(`http://localhost:3030/iframe-html/main.html`, {
|
||||
waitUntil: 'load',
|
||||
@@ -293,7 +290,6 @@ describe('shadow DOM integration tests', function (this: ISuite) {
|
||||
it('snapshot shadow DOM', async () => {
|
||||
const page: puppeteer.Page = await browser.newPage();
|
||||
// console for debug
|
||||
// tslint:disable-next-line: no-console
|
||||
page.on('console', (msg) => console.log(msg.text()));
|
||||
await page.goto(`http://localhost:3030/html/shadow-dom.html`, {
|
||||
waitUntil: 'load',
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||
// tslint:disable
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return */
|
||||
/**
|
||||
* Class StackFrame is a fork of https://github.com/stacktracejs/stackframe/blob/master/stackframe.js
|
||||
* I fork it because:
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// tslint:disable:no-any no-bitwise forin
|
||||
/**
|
||||
* this file is used to serialize log message to string
|
||||
*
|
||||
@@ -27,7 +26,6 @@ function pathToSelector(node: HTMLElement): string | '' {
|
||||
const domSiblings = [];
|
||||
|
||||
if (parent.children && parent.children.length > 0) {
|
||||
// tslint:disable-next-line:prefer-for-of
|
||||
for (let i = 0; i < parent.children.length; i++) {
|
||||
const sibling = parent.children[i];
|
||||
if (sibling.localName && sibling.localName.toLowerCase) {
|
||||
|
||||
@@ -720,8 +720,7 @@ function initFontObserver({ fontCb, doc }: observerParam): listenerHandler {
|
||||
fontSource:
|
||||
typeof source === 'string'
|
||||
? source
|
||||
: // tslint:disable-next-line: no-any
|
||||
JSON.stringify(Array.from(new Uint8Array(source))),
|
||||
: JSON.stringify(Array.from(new Uint8Array(source))),
|
||||
});
|
||||
return fontFace;
|
||||
} as unknown) as typeof FontFace;
|
||||
|
||||
@@ -125,7 +125,6 @@ export class Replayer {
|
||||
|
||||
private nextUserInteractionEvent: eventWithTime | null;
|
||||
|
||||
// tslint:disable-next-line: variable-name
|
||||
private legacy_missingNodeRetryMap: missingNodeMap = {};
|
||||
|
||||
// The replayer uses the cache to speed up replay and scrubbing.
|
||||
@@ -1050,7 +1049,6 @@ export class Replayer {
|
||||
* triggers the 'click' css animation in styles/style.css
|
||||
*/
|
||||
this.mouse.classList.remove('active');
|
||||
// tslint:disable-next-line
|
||||
void this.mouse.offsetWidth;
|
||||
this.mouse.classList.add('active');
|
||||
} else if (d.type === MouseInteractions.TouchStart) {
|
||||
@@ -1401,7 +1399,6 @@ export class Replayer {
|
||||
}
|
||||
});
|
||||
|
||||
// tslint:disable-next-line: variable-name
|
||||
const legacy_missingNodeMap: missingNodeMap = {
|
||||
...this.legacy_missingNodeRetryMap,
|
||||
};
|
||||
@@ -1893,7 +1890,6 @@ export class Replayer {
|
||||
if (!this.config.showDebug) {
|
||||
return;
|
||||
}
|
||||
// tslint:disable-next-line: no-console
|
||||
console.log(REPLAY_CONSOLE_PREFIX, ...args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// tslint:disable-next-line: no-any
|
||||
export type AnyObject = { [key: string]: any; __rrdom__?: RRdomTreeNode };
|
||||
|
||||
export class RRdomTreeNode implements AnyObject {
|
||||
@@ -30,7 +29,6 @@ export class RRdomTreeNode implements AnyObject {
|
||||
}
|
||||
|
||||
public childrenChanged() {
|
||||
// tslint:disable-next-line: no-bitwise
|
||||
this.childrenVersion = (this.childrenVersion + 1) & 0xffffffff;
|
||||
this.childIndexCachedUpTo = null;
|
||||
}
|
||||
|
||||
@@ -126,10 +126,8 @@ export function hookSetter<T>(
|
||||
|
||||
// copy from https://github.com/getsentry/sentry-javascript/blob/b2109071975af8bf0316d3b5b38f519bdaf5dc15/packages/utils/src/object.ts
|
||||
export function patch(
|
||||
// tslint:disable-next-line:no-any
|
||||
source: { [key: string]: any },
|
||||
name: string,
|
||||
// tslint:disable-next-line:no-any
|
||||
replacement: (...args: unknown[]) => unknown,
|
||||
): () => void {
|
||||
try {
|
||||
@@ -144,7 +142,6 @@ export function patch(
|
||||
|
||||
// Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work
|
||||
// otherwise it'll throw "TypeError: Object.defineProperties called on non-object"
|
||||
// tslint:disable-next-line:strict-type-predicates
|
||||
if (typeof wrapped === 'function') {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
||||
wrapped.prototype = wrapped.prototype || {};
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// tslint:disable:no-console no-any
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import type { Page } from 'puppeteer';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// tslint:disable:no-console
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import type * as puppeteer from 'puppeteer';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* tslint:disable no-console */
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import type * as puppeteer from 'puppeteer';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* tslint:disable no-console */
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import type * as puppeteer from 'puppeteer';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* tslint:disable no-string-literal no-console */
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import type * as puppeteer from 'puppeteer';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// tslint:disable:no-console no-any
|
||||
import { NodeType } from 'rrweb-snapshot';
|
||||
import {
|
||||
EventType,
|
||||
|
||||
Reference in New Issue
Block a user