chore: error on unused eslint disables (#26510)

This commit is contained in:
Marcin Strzyz 2023-08-17 11:53:36 -07:00 committed by GitHub
parent 475c96d4c2
commit 6b2d93a890
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 2 additions and 6 deletions

View File

@ -26,7 +26,7 @@
"ttest": "node ./tests/playwright-test/stable-test-runner/node_modules/@playwright/test/cli test --config=tests/playwright-test/playwright.config.ts",
"ct": "playwright test tests/components/test-all.spec.js --reporter=list",
"test": "playwright test --config=tests/library/playwright.config.ts",
"eslint": "eslint --cache --ext ts,tsx .",
"eslint": "eslint --cache --report-unused-disable-directives --ext ts,tsx .",
"tsc": "tsc -p .",
"build-installer": "babel -s --extensions \".ts\" --out-dir packages/playwright-core/lib/utils/ packages/playwright-core/src/utils",
"doc": "node utils/doclint/cli.js",

View File

@ -70,7 +70,7 @@ export async function runServer(options: RunServerOptions) {
const server = new PlaywrightServer({ mode: extension ? 'extension' : 'default', path, maxConnections });
const wsEndpoint = await server.listen(port);
process.on('exit', () => server.close().catch(console.error));
console.log('Listening on ' + wsEndpoint); // eslint-disable-line no-console
console.log('Listening on ' + wsEndpoint);
process.stdin.on('close', () => gracefullyProcessExitDoNotHang(0));
}

View File

@ -121,7 +121,6 @@ function getAnimatedDownloadProgress(): OnProgressCallback {
}
function getBasicDownloadProgress(): OnProgressCallback {
// eslint-disable-next-line no-console
const totalRows = 10;
const stepWidth = 8;
let lastRow = -1;

View File

@ -207,7 +207,6 @@ function getIsAvailableFunction(url: string, checkPortOnly: boolean, ignoreHTTPS
}
export const webServer = (options: WebServerPluginOptions): TestRunnerPlugin => {
// eslint-disable-next-line no-console
return new WebServerPlugin(options, false);
};

View File

@ -14,7 +14,6 @@
* limitations under the License.
*/
/* eslint-disable no-console */
import { colors, ms as milliseconds } from 'playwright-core/lib/utilsBundle';
import { BaseReporter, formatError, formatTestTitle, stepSuffix, stripAnsiEscapes } from './base';
import type { FullResult, Suite, TestCase, TestError, TestResult, TestStep } from '../../types/testReporter';

View File

@ -18,7 +18,6 @@ import * as React from 'react';
import './stackTrace.css';
import type { ActionTraceEvent } from '@trace/trace';
import { ListView } from '@web/components/listView';
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
import type { StackFrame } from '@protocol/channels';
const StackFrameListView = ListView<StackFrame>;