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

refactor: Unify eslint config, convert to flat configs and update plugins (WIP) #30892

Open
wants to merge 122 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
228246c
remove eslint-plugin-dev
cacieprins Jan 14, 2025
7f3c67e
more fully remove eslint dev pkg
cacieprins Jan 14, 2025
920e1c7
use updated eslint for ./scripts
cacieprins Jan 14, 2025
00f1243
use new eslint for cli
cacieprins Jan 14, 2025
7c30ac8
npm/angular linting
cacieprins Jan 14, 2025
0a7039b
cypress-schematic eslint
cacieprins Jan 14, 2025
3f44b01
eslint for npm/grep
cacieprins Jan 14, 2025
6d821ab
npm/mount-utils
cacieprins Jan 14, 2025
57a038d
npm/puppeteer
cacieprins Jan 14, 2025
32ebb37
some global cfg
cacieprins Jan 14, 2025
ed49878
npm/react
cacieprins Jan 14, 2025
0749dbe
npm/svelte
cacieprins Jan 14, 2025
4c15d08
npm/vite-dev-server
cacieprins Jan 14, 2025
9433e5d
npm/vite-plugin-cypress-esm
cacieprins Jan 14, 2025
fe99b9f
adds react linting to npm/react
cacieprins Jan 14, 2025
d9c2439
npm/vue
cacieprins Jan 14, 2025
5205963
npm/webpack-batteries-included-preprocessor
cacieprins Jan 14, 2025
5be93e7
npm/webpack-dev-server
cacieprins Jan 14, 2025
1b1862a
npm/webpack-preprocessor
cacieprins Jan 14, 2025
7ce76db
use stylistic for ./scripts
cacieprins Jan 14, 2025
2ac9889
npm/angular with styles
cacieprins Jan 14, 2025
53d7cab
npm/cypress-schematic stylistic
cacieprins Jan 14, 2025
8c866c1
npm/grep stylistic
cacieprins Jan 14, 2025
d4d0637
npm/mount-utils stylistic
cacieprins Jan 14, 2025
77f38fc
npm/puppeteer stylistic
cacieprins Jan 14, 2025
c62768e
npm/react stylistic
cacieprins Jan 14, 2025
fb74c93
npm/svelte stylistic
cacieprins Jan 14, 2025
a0ea82b
adds back some restricted properties and syntax
cacieprins Jan 14, 2025
c34babc
npm/vite-dev-server stylistic
cacieprins Jan 14, 2025
58a38ac
npm/vite-plugin-cypress-esm stylistic
cacieprins Jan 14, 2025
816ba0d
npm/vue stylistic
cacieprins Jan 14, 2025
124ad49
npm/webpack-batteries-included stylistic
cacieprins Jan 14, 2025
3cb0c44
npm/webpack-dev-server stylistic
cacieprins Jan 14, 2025
9d84f3d
npm/webpack-preprocessor stylistic
cacieprins Jan 14, 2025
27797d0
cli stylistic
cacieprins Jan 14, 2025
d7bac78
new linting for packages/app
cacieprins Jan 14, 2025
6434772
remove conflicting old eslintrc from app
cacieprins Jan 15, 2025
eed56c0
lint fix for packages/config
cacieprins Jan 15, 2025
d035fa9
redundant rules in puppeteer
cacieprins Jan 15, 2025
8ba5ccb
eslint for packages/data-context
cacieprins Jan 15, 2025
b664d1b
eslint for packages/driver
cacieprins Jan 15, 2025
007aae2
eslint cleanup general
cacieprins Jan 15, 2025
85be136
packages/electron
cacieprins Jan 15, 2025
e2ed779
packages/errors
cacieprins Jan 15, 2025
abf276f
packages/example
cacieprins Jan 15, 2025
45184c0
rm
cacieprins Jan 15, 2025
93fb014
packages/extension
cacieprins Jan 15, 2025
2869f9a
basic linting for packages/frontend-shared
cacieprins Jan 15, 2025
df20017
basic graphql schema linting
cacieprins Jan 15, 2025
77b113e
eslint for packages/graphql
cacieprins Jan 15, 2025
7b7fb97
some cleanup
cacieprins Jan 15, 2025
1228a72
packages/https-proxy
cacieprins Jan 15, 2025
b79bf01
packages/icons
cacieprins Jan 15, 2025
bcbb78b
packages/launcher
cacieprins Jan 15, 2025
8529b72
packages/launchpad
cacieprins Jan 15, 2025
1c577fc
further restrict launchpad eslint to reduce impact of slow vue linting
cacieprins Jan 15, 2025
cbb673b
packages/net-stubbing
cacieprins Jan 15, 2025
3cb0ba1
packages/network
cacieprins Jan 15, 2025
8c1f83f
packages/packherd-require
cacieprins Jan 15, 2025
ad4bb60
packages/proxy
cacieprins Jan 15, 2025
92e192b
packages/reporter
cacieprins Jan 15, 2025
5c06e17
packages/resolve-dist
cacieprins Jan 15, 2025
d70180b
packages/rewriter
cacieprins Jan 15, 2025
a98c2bd
packages/runner
cacieprins Jan 15, 2025
ddbe9a9
packages/scaffold-config
cacieprins Jan 15, 2025
925955f
packages/server
cacieprins Jan 15, 2025
9b12088
packages/socket
cacieprins Jan 15, 2025
ecbe1f0
packages/telemetry
cacieprins Jan 15, 2025
32d1009
rm old eslintrc
cacieprins Jan 15, 2025
02f9730
packages/ts
cacieprins Jan 15, 2025
23dff45
packages/types
cacieprins Jan 15, 2025
08e1227
packages/v8-snapshot-require
cacieprins Jan 15, 2025
0d450bd
packages/web-config
cacieprins Jan 15, 2025
f174d7c
system-tests
cacieprins Jan 15, 2025
10bdd9f
tooling/electron-mksnapshot
cacieprins Jan 15, 2025
7d48750
rm old eslintrc
cacieprins Jan 15, 2025
643e17c
tooling/packherd
cacieprins Jan 15, 2025
ca7441a
tooling/v8-snapshot
cacieprins Jan 15, 2025
add6226
delete unnecessary eslintrc.json
cacieprins Jan 15, 2025
3e35bce
fix mount-utils eslint config
cacieprins Jan 15, 2025
7b44b56
fix webpack-preprocessor eslint.config.ts
cacieprins Jan 15, 2025
63a0d72
fix puppeteer eslint
cacieprins Jan 15, 2025
2e14154
fix svelte eslint config
cacieprins Jan 15, 2025
9462fc5
fix vite-plugin-cypress-esm eslint config
cacieprins Jan 15, 2025
b264d90
grep eslint fix
cacieprins Jan 15, 2025
1d1d61c
fix webpack-batteries eslint config
cacieprins Jan 15, 2025
9ec71b5
fix schematic
cacieprins Jan 15, 2025
ce4bbc8
fix vue eslint config
cacieprins Jan 15, 2025
515fb78
fix vite-dev-server eslint
cacieprins Jan 15, 2025
3d141fb
fix padding in cli
cacieprins Jan 15, 2025
3115ed7
fix npm/react
cacieprins Jan 15, 2025
2fdc396
fix lint in packages/config
cacieprins Jan 16, 2025
be425ab
fix lint for npm/webpack-dev-server
cacieprins Jan 16, 2025
09582b4
fix packages/electron
cacieprins Jan 16, 2025
0845c5c
fix extension
cacieprins Jan 16, 2025
ef293d4
eslint fixes for runner
cacieprins Jan 16, 2025
1dc3f65
set some react rules to warn
cacieprins Jan 16, 2025
2748955
fixes packages/driver
cacieprins Jan 16, 2025
f03c6ae
disable inapplicable react rules
cacieprins Jan 16, 2025
6f5340c
fix frontend-shared
cacieprins Jan 16, 2025
f4f5148
add class= back in
cacieprins Jan 16, 2025
f968f74
react rules do not apply to vue component tests
cacieprins Jan 16, 2025
4d1a034
fix whitespace in tooling/packherd
cacieprins Jan 16, 2025
69e6d51
data-context and internal scripts
cacieprins Jan 16, 2025
c965691
app eslint fixes
cacieprins Jan 16, 2025
1206812
final pass fixes for check-ts and lint
cacieprins Jan 16, 2025
4afc395
Merge branch 'develop' into eslint-stylistic
cacieprins Jan 16, 2025
4f6d36f
fix sorting in root package json, add (?does it work?) json eslint pl…
cacieprins Jan 16, 2025
6be9cd0
remove unused `path` identifier in root eslint.config.ts
cacieprins Jan 16, 2025
36b8655
expound on eslint methodology in CONTRIBUTING.md
cacieprins Jan 16, 2025
b2a7e3e
use prettier for json files, use prettier-package-json for package.js…
cacieprins Jan 21, 2025
09e07a4
Merge branch 'develop' into eslint-stylistic
cacieprins Jan 21, 2025
66b69a2
Update package.json
cacieprins Jan 21, 2025
3a27427
ignore .d.ts files in system-tests
cacieprins Jan 21, 2025
9f30b85
ignore validations in system tests
cacieprins Jan 22, 2025
2d745d8
Merge branch 'develop' into eslint-stylistic
cacieprins Mar 14, 2025
68cdad7
update lock
cacieprins Mar 14, 2025
b49126b
start moving baseConfig to @tooling/eslint-config
cacieprins Feb 18, 2025
cd60bfc
declare dependency on eslint-config
cacieprins Feb 19, 2025
506b08d
use eslint-config in tooling/scripts
cacieprins Feb 19, 2025
683353c
system tests - import rules and new baseconfig
cacieprins Feb 19, 2025
80c2613
WIP: import-x defaults
cacieprins Mar 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
packages/server
cacieprins committed Jan 15, 2025
commit 925955f28639182ca6e173739f428f648315e4ba
7 changes: 0 additions & 7 deletions packages/server/.eslintignore

This file was deleted.

32 changes: 32 additions & 0 deletions packages/server/eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { baseConfig } from '../../eslint.config'
import globals from 'globals'

export default [
...baseConfig,
{
ignores: ['**/fixtures/**/*'],
},
{
languageOptions: {
parserOptions: {
projectService: false,
project: './eslint.tsconfig.json',
},
globals: {
...globals.node,
},
},
},
{
files: ['test/**'],
languageOptions: {
globals: {
sinon: 'readonly',
nock: 'readonly',
mockery: 'readonly',
proxyquire: 'readonly',
supertest: 'readonly',
},
},
},
]
8 changes: 8 additions & 0 deletions packages/server/eslint.tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": true,
"allowJs": true
},
"include": ["**/*"]
}
5 changes: 4 additions & 1 deletion packages/server/lib/browsers/cdp-connection.ts
Original file line number Diff line number Diff line change
@@ -65,21 +65,24 @@ export class CDPConnection {

get ws () {
// this is reached into by browser-cri-client to detect close events - needs rethinking
return (this._connection as { _ws?: WebSocket})._ws
return (this._connection as { _ws?: WebSocket })._ws
}

on<T extends CdpEvent> (event: T, callback: CDPListener<T>) {
this.debug('attaching event listener to cdp connection', event)

this._emitter.on(event, callback)
}

addConnectionEventListener<T extends CDPConnectionEvent> (event: T, callback: CDPConnectionEventListener<T>) {
this.debug('adding connection event listener for ', event)
this._emitter.on(event, callback)
}

off<T extends CdpEvent> (event: T, callback: CDPListener<T>) {
this._emitter.off(event, callback)
}

removeConnectionEventListener<T extends CDPConnectionEvent> (event: T, callback: CDPConnectionEventListener<T>) {
this._emitter.off(event, callback)
}
1 change: 0 additions & 1 deletion packages/server/lib/browsers/cdp_automation.ts
Original file line number Diff line number Diff line change
@@ -378,7 +378,6 @@ export class CdpAutomation implements CDPClient {
})
}

// eslint-disable-next-line @cypress/dev/arrow-body-multiline-braces
private _updateFrameTree = (client: CriClient, eventName) => async () => {
debugVerbose(`update frame tree for ${eventName}`)

2 changes: 1 addition & 1 deletion packages/server/lib/browsers/chrome.ts
Original file line number Diff line number Diff line change
@@ -551,7 +551,7 @@ export = {
// first allows us to connect the remote interface,
// start video recording and then
// we will load the actual page
const launchedBrowser = await launch(browser, 'about:blank', port, args, launchOptions.env) as unknown as BrowserInstance & { browserCriClient: BrowserCriClient}
const launchedBrowser = await launch(browser, 'about:blank', port, args, launchOptions.env) as unknown as BrowserInstance & { browserCriClient: BrowserCriClient }

la(launchedBrowser, 'did not get launched browser instance')

2 changes: 1 addition & 1 deletion packages/server/lib/browsers/firefox.ts
Original file line number Diff line number Diff line change
@@ -326,7 +326,7 @@ const defaultPreferences = {
'dom.timeout.enable_budget_timer_throttling': false,

// allow getUserMedia APIs on insecure domains
'media.devices.insecure.enabled': true,
'media.devices.insecure.enabled': true,
'media.getusermedia.insecure.enabled': true,

'marionette.log.level': launcherDebug.enabled ? 'Debug' : undefined,
2 changes: 1 addition & 1 deletion packages/server/lib/browsers/memory/cgroup-v1.ts
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ const getTotalMemoryLimit = async () => {
* @returns object of memory stats
*/
const convertRawStats = (rawStats: string): { total_inactive_file: string } => {
const stats = rawStats.split('\n').filter(Boolean).reduce((acc, arr): { total_inactive_file: string} => {
const stats = rawStats.split('\n').filter(Boolean).reduce((acc, arr): { total_inactive_file: string } => {
const stat = arr.split(' ')

acc[stat[0]] = stat[1]
2 changes: 1 addition & 1 deletion packages/server/lib/browsers/memory/index.ts
Original file line number Diff line number Diff line change
@@ -251,7 +251,7 @@ export const calculateMemoryStats: () => Promise<void> = measure(async () => {
* @param automation - the automation client used to collect garbage
* @param test - the current test
*/
const checkMemoryPressureAndLog = async ({ automation, test }: { automation: Automation, test: { title: string, order: number, currentRetry: number }}) => {
const checkMemoryPressureAndLog = async ({ automation, test }: { automation: Automation, test: { title: string, order: number, currentRetry: number } }) => {
await checkMemoryPressure(automation)

gcLog.testTitle = test.title
9 changes: 4 additions & 5 deletions packages/server/lib/browsers/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-redeclare */
import Bluebird from 'bluebird'
import _ from 'lodash'
import type { FoundBrowser } from '@packages/types'
@@ -55,10 +54,10 @@ const getMajorVersion = (version) => {
}

const defaultLaunchOptions: {
preferences: {[key: string]: any}
preferences: { [key: string]: any }
extensions: string[]
args: string[]
env: {[key: string]: any}
env: { [key: string]: any }
} = {
preferences: {},
extensions: [],
@@ -318,8 +317,8 @@ const parseBrowserOption = (opt) => {
}
}

function ensureAndGetByNameOrPath(nameOrPath: string, returnAll: false, browsers?: FoundBrowser[]): Bluebird<FoundBrowser>
function ensureAndGetByNameOrPath(nameOrPath: string, returnAll: true, browsers?: FoundBrowser[]): Bluebird<FoundBrowser[]>
function ensureAndGetByNameOrPath (nameOrPath: string, returnAll: false, browsers?: FoundBrowser[]): Bluebird<FoundBrowser>
function ensureAndGetByNameOrPath (nameOrPath: string, returnAll: true, browsers?: FoundBrowser[]): Bluebird<FoundBrowser[]>

async function ensureAndGetByNameOrPath (nameOrPath: string, returnAll = false, prevKnownBrowsers: FoundBrowser[] = []) {
const browsers = prevKnownBrowsers.length ? prevKnownBrowsers : (await getBrowsers())
2 changes: 0 additions & 2 deletions packages/server/lib/capture.js
Original file line number Diff line number Diff line change
@@ -21,15 +21,13 @@ const stdout = function () {
process.log = function (str) {
logs.push(str)

// eslint-disable-next-line prefer-rest-params
return log.apply(this, arguments)
}
}

process.stdout.write = function (str) {
logs.push(str)

// eslint-disable-next-line prefer-rest-params
return write.apply(this, arguments)
}

4 changes: 2 additions & 2 deletions packages/server/lib/cloud/artifacts/screenshot_artifact.ts
Original file line number Diff line number Diff line change
@@ -18,8 +18,8 @@ const createScreenshotArtifact = async (filePath: string, uploadUrl: string): Pr
}

export const createScreenshotArtifactBatch = (
screenshotUploadUrls: {screenshotId: string, uploadUrl: string}[],
screenshotFiles: {screenshotId: string, path: string}[],
screenshotUploadUrls: { screenshotId: string, uploadUrl: string }[],
screenshotFiles: { screenshotId: string, path: string }[],
): Promise<IArtifact[]> => {
const correlatedPaths = screenshotUploadUrls.map(({ screenshotId, uploadUrl }) => {
const correlatedFilePath = screenshotFiles.find((pathPair) => {
1 change: 1 addition & 0 deletions packages/server/lib/cloud/network/parse_error.ts
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ export class ParseError extends Error {
constructor (public readonly originalError: Error, message?: string) {
super(message)
}

static isParseError (err: Error & { kind: string }): err is ParseError {
return err.kind === ParseErrorKind
}
4 changes: 2 additions & 2 deletions packages/server/lib/cloud/network/put_fetch.ts
Original file line number Diff line number Diff line change
@@ -20,8 +20,8 @@ type PutOptions = PutInit & {
parse?: ParseKind
}

export async function putFetch <
TReturn extends any
export async function putFetch<
TReturn,
> (input: RequestInfo | URL, options: PutOptions = { parse: 'json' }): Promise<TReturn> {
const {
parse,
2 changes: 1 addition & 1 deletion packages/server/lib/cloud/upload/stream_stalled_error.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ export class StreamStalledError extends Error {
super(`Stream stalled: failed to transfer ${chunkSizeKB} kilobytes over the previous ${maxActivityDwellTime}ms`)
}

public static isStreamStalledError (error: Error & {kind?: any}): error is StreamStalledError {
public static isStreamStalledError (error: Error & { kind?: any }): error is StreamStalledError {
return error.kind === StreamStalledErrorKind
}
}
1 change: 0 additions & 1 deletion packages/server/lib/controllers/iframes.ts
Original file line number Diff line number Diff line change
@@ -61,7 +61,6 @@ export const iframesController = {

nodeProxy.web(req, res, {}, (e) => {
if (e) {
// eslint-disable-next-line
debug('Proxy request error. This is likely the socket hangup issue, we can basically ignore this because the stream will automatically continue once the asset will be available', e)
}
})
3 changes: 1 addition & 2 deletions packages/server/lib/modes/interactive.ts
Original file line number Diff line number Diff line change
@@ -10,7 +10,6 @@ import { makeGraphQLServer } from '@packages/graphql/src/makeGraphQLServer'
import { globalPubSub, getCtx, clearCtx } from '@packages/data-context'
import { telemetry } from '@packages/telemetry'

// eslint-disable-next-line no-duplicate-imports
import type { WebContents } from 'electron'
import type { LaunchArgs, Preferences } from '@packages/types'

@@ -91,7 +90,7 @@ export = {
y: 'appY',
devTools: 'isAppDevToolsOpen',
},
onBlur (this: {webContents: WebContents}) {
onBlur (this: { webContents: WebContents }) {
if (this.webContents.isDevToolsOpened()) {
return
}
2 changes: 0 additions & 2 deletions packages/server/lib/modes/results.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @cypress/dev/arrow-body-multiline-braces */

import _ from 'lodash'
import type { FoundBrowser, SpecWithRelativeRoot } from '@packages/types'
import path from 'path'
3 changes: 1 addition & 2 deletions packages/server/lib/modes/run.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint-disable no-console, @cypress/dev/arrow-body-multiline-braces */
/* eslint-disable no-console */
import _ from 'lodash'
import pkg from '@packages/root'
import path from 'path'
@@ -432,7 +432,6 @@ async function listenForProjectEnd (project: ProjectBase, exit: boolean): Promis
earlyExitTerminator.waitForEarlyExit(project, exit),
]).then((results) => {
if (exit === false) {
// eslint-disable-next-line no-console
console.log('not exiting due to options.exit being false')
} else {
resolve(results)
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-redeclare
/* global window */
(({ browserFamily, isSpecBridge, key, namespace, scripts, url, win = window, documentDomainContext }) => {
/**
1 change: 0 additions & 1 deletion packages/server/lib/routes.ts
Original file line number Diff line number Diff line change
@@ -267,7 +267,6 @@ export const createCommonRoutes = ({
// their own app.js files + spec.js files
nodeProxy.web(req, res, {}, (e) => {
if (e) {
// eslint-disable-next-line
debug('Proxy request error. This is likely the socket hangup issue, we can basically ignore this because the stream will automatically continue once the asset will be available', e)
}
})
2 changes: 1 addition & 1 deletion packages/server/lib/server-base.ts
Original file line number Diff line number Diff line change
@@ -486,7 +486,7 @@ export class ServerBase<TSocket extends SocketE2E | SocketCt> {
return ios
}

createHosts (hosts: {[key: string]: string} | null = {}) {
createHosts (hosts: { [key: string]: string } | null = {}) {
return _.each(hosts, (ip, host) => {
return evilDns.add(host, ip)
})
2 changes: 1 addition & 1 deletion packages/server/lib/socket-base.ts
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ import runEvents from './plugins/run_events'
import type { OTLPTraceExporterCloud } from '@packages/telemetry'
import { telemetry } from '@packages/telemetry'
import type { Automation } from './automation'
// eslint-disable-next-line no-duplicate-imports

import type { Socket } from '@packages/socket'

import type { RunState, CachedTestState, ProtocolManagerShape } from '@packages/types'
4 changes: 2 additions & 2 deletions packages/server/lib/util/async_retry.ts
Original file line number Diff line number Diff line change
@@ -4,9 +4,9 @@ type RetryOptions = {
shouldRetry?: (err?: Error) => boolean
}

export function asyncRetry <
export function asyncRetry<
TArgs extends any[],
TResult extends any,
TResult,
> (fn: (...args: TArgs) => Promise<TResult>, options: RetryOptions) {
return async (...args: TArgs): Promise<TResult> => {
let attempt = 0
2 changes: 1 addition & 1 deletion packages/server/lib/util/ensure-url.ts
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ const debug = debugModule('cypress:server:ensure-url')

type RetryOptions = {
retryIntervals: number[]
onRetry(o: {delay: number, attempt: number, remaining: number}): void
onRetry(o: { delay: number, attempt: number, remaining: number }): void
}

export const retryIsListening = (urlStr: string, options: RetryOptions) => {
2 changes: 0 additions & 2 deletions packages/server/lib/util/fs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable no-console */

import Bluebird from 'bluebird'
import fsExtra from 'fs-extra'

4 changes: 0 additions & 4 deletions packages/server/lib/util/print-run.ts
Original file line number Diff line number Diff line change
@@ -608,13 +608,11 @@ export const logUploadManifest = (artifacts: IArtifact[], protocolCaptureMeta: {
[ArtifactKinds.PROTOCOL]: 'Test Replay',
}

// eslint-disable-next-line no-console
console.log('')
terminal.header('Uploading Cloud Artifacts', {
color: ['blue'],
})

// eslint-disable-next-line no-console
console.log('')

const video = artifacts.find(({ reportKey }) => reportKey === ArtifactKinds.VIDEO)
@@ -686,14 +684,12 @@ export const logUploadResults = (results: ArtifactUploadResult[], protocolFatalE
[ArtifactKinds.PROTOCOL]: 'Test Replay',
}

// eslint-disable-next-line no-console
console.log('')

terminal.header('Uploaded Cloud Artifacts', {
color: ['blue'],
})

// eslint-disable-next-line no-console
console.log('')

results.forEach(({ key, ...report }, i, { length }) => {
3 changes: 3 additions & 0 deletions packages/server/lib/util/stream_buffer.ts
Original file line number Diff line number Diff line change
@@ -117,13 +117,16 @@ function streamBuffer (initialSize = 2048) {

return readable
}

unpipeAll () {
buffer = null // aggressive GC
_.invokeMap(this.readers, 'unpipe')
}

_buffer () {
return buffer
}

_finished () {
return finished
}
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
"dev": "node index.js",
"docker": "cd ../.. && WORKING_DIR=/packages/server ./scripts/run-docker-local.sh",
"postinstall": "patch-package",
"lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .",
"lint": "eslint .",
"rebuild-better-sqlite3": "electron-rebuild -f -o better-sqlite3",
"repl": "node repl.js",
"start": "node ../../scripts/cypress open --dev --global",
1 change: 1 addition & 0 deletions packages/server/test/integration/cypress_spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable no-console */
// eslint-disable-next-line no-redeclare
/*global globalThis*/
require('../spec_helper')
const _ = require('lodash')
2 changes: 1 addition & 1 deletion packages/server/test/unit/cloud/network/put_fetch_spec.ts
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ describe('cloud/network/put_fetch', () => {

describe('and parseJSON flag is true', () => {
it('resolves with the parsed object', async () => {
const res = await fetch<{'content': string}>(url)
const res = await fetch<{ 'content': string }>(url)

expect(res).to.eq(jsonObj)
})
2 changes: 1 addition & 1 deletion packages/server/test/unit/config_spec.js
Original file line number Diff line number Diff line change
@@ -890,7 +890,7 @@ describe('lib/config', () => {

context('retries', () => {
// need to keep the const here or it'll get stripped by the build
// eslint-disable-next-line no-unused-vars

const cases = [
[{ retries: null }, 'with null', null],
[{ retries: 3 }, 'when a number', null],
3 changes: 1 addition & 2 deletions packages/server/test/unit/util/suppress_warnings_spec.ts
Original file line number Diff line number Diff line change
@@ -40,9 +40,8 @@ describe('lib/util/suppress_warnings', function () {

suppress()

// eslint-disable-next-line no-buffer-constructor
new Buffer(0)
// eslint-disable-next-line no-buffer-constructor

new Buffer('asdf')

expect(emitWarning).not.to.be.called