Skip to content

Commit

Permalink
chore: error on unused eslint disables (#26510)
Browse files Browse the repository at this point in the history
  • Loading branch information
mastrzyz authored Aug 17, 2023
1 parent 475c96d commit 6b2d93a
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright-core/src/cli/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion packages/playwright-test/src/plugins/webServerPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down
1 change: 0 additions & 1 deletion packages/playwright-test/src/reporters/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
1 change: 0 additions & 1 deletion packages/trace-viewer/src/ui/stackTrace.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down

0 comments on commit 6b2d93a

Please sign in to comment.