Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

chore(lint): Ensure EOL newlines (#34117)

Adam Gastineau875436855ea2
diff --git a/.eslintignore b/.eslintignore
index 9d22f618d8..fdcc76dda0 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -3,6 +3,9 @@ test/assets/modernizr.js
/packages/*/lib/
*.js
/packages/playwright-core/src/generated/*
+/packages/playwright-core/src/protocol/debug.ts
+/packages/playwright-core/src/protocol/validator.ts
+/packages/playwright-core/src/server/injected/recorder/clipPaths.ts
/packages/playwright-core/src/third_party/
/packages/playwright-core/types/*
/packages/playwright-ct-core/src/generated/*
diff --git a/.eslintrc.js b/.eslintrc.js
index a116a37036..e71a4ffd09 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -115,7 +115,7 @@ module.exports = {
"@typescript-eslint/type-annotation-spacing": 2,
// file whitespace
- "no-multiple-empty-lines": [2, {"max": 2}],
+ "no-multiple-empty-lines": [2, {"max": 2, "maxEOF": 0}],
"no-mixed-spaces-and-tabs": 2,
"no-trailing-spaces": 2,
"linebreak-style": [ process.platform === "win32" ? 0 : 2, "unix" ],
@@ -123,6 +123,7 @@ module.exports = {
"key-spacing": [2, {
"beforeColon": false
}],
+ "eol-last": 2,
// copyright
"notice/notice": [2, {
diff --git a/packages/html-reporter/bundle.ts b/packages/html-reporter/bundle.ts
index 4c6bc02632..63530cfaad 100644
--- a/packages/html-reporter/bundle.ts
+++ b/packages/html-reporter/bundle.ts
@@ -51,4 +51,4 @@ export function bundle(): Plugin {
}
},
};
-}
\ No newline at end of file
+}
diff --git a/packages/html-reporter/src/utils.ts b/packages/html-reporter/src/utils.ts
index 65404b2fe7..eec765969b 100644
--- a/packages/html-reporter/src/utils.ts
+++ b/packages/html-reporter/src/utils.ts
@@ -47,4 +47,3 @@ export function hashStringToInt(str: string) {
hash = str.charCodeAt(i) + ((hash << 8) - hash);
return Math.abs(hash % 6);
}
-
diff --git a/packages/playwright-core/src/common/types.ts b/packages/playwright-core/src/common/types.ts
index 55145b5565..f71d4237cd 100644
--- a/packages/playwright-core/src/common/types.ts
+++ b/packages/playwright-core/src/common/types.ts
@@ -20,4 +20,4 @@ export type Rect = Size & Point;
export type Quad = [ Point, Point, Point, Point ];
export type TimeoutOptions = { timeout?: number };
export type NameValue = { name: string, value: string };
-export type HeadersArray = NameValue[];
\ No newline at end of file
+export type HeadersArray = NameValue[];
diff --git a/packages/playwright-core/src/image_tools/stats.ts b/packages/playwright-core/src/image_tools/stats.ts
index b35371b4a1..79b170243c 100644
--- a/packages/playwright-core/src/image_tools/stats.ts
+++ b/packages/playwright-core/src/image_tools/stats.ts
@@ -124,4 +124,3 @@ export class FastStats implements Stats {
return (this._sum(this._partialSumMult, x1, y1, x2, y2) - this._sum(this._partialSumC1, x1, y1, x2, y2) * this._sum(this._partialSumC2, x1, y1, x2, y2) / N) / N;
}
}
-
diff --git a/packages/playwright-core/src/server/android/android.ts b/packages/playwright-core/src/server/android/android.ts
index 1af083916c..b6303935b7 100644
--- a/packages/playwright-core/src/server/android/android.ts
+++ b/packages/playwright-core/src/server/android/android.ts
@@ -524,5 +524,3 @@ class ClankBrowserProcess implements BrowserProcess {
await this._browser.close();
}
}
-
-
diff --git a/packages/playwright-core/src/server/fileUploadUtils.ts b/packages/playwright-core/src/server/fileUploadUtils.ts
index 22ac13b127..2696ba0116 100644
--- a/packages/playwright-core/src/server/fileUploadUtils.ts
+++ b/packages/playwright-core/src/server/fileUploadUtils.ts
@@ -77,4 +77,4 @@ export async function prepareFilesForUpload(frame: Frame, params: channels.Eleme
}));
return { localPaths, localDirectory, filePayloads };
-}
\ No newline at end of file
+}
diff --git a/packages/playwright-core/src/server/firefox/ffBrowser.ts b/packages/playwright-core/src/server/firefox/ffBrowser.ts
index 92998a7946..1d1c60e6ce 100644
--- a/packages/playwright-core/src/server/firefox/ffBrowser.ts
+++ b/packages/playwright-core/src/server/firefox/ffBrowser.ts
@@ -436,4 +436,3 @@ function toJugglerProxyOptions(proxy: types.ProxySettings) {
// Prefs for quick fixes that didn't make it to the build.
// Should all be moved to `playwright.cfg`.
const kBandaidFirefoxUserPrefs = {};
-
diff --git a/packages/playwright-core/src/server/firefox/firefox.ts b/packages/playwright-core/src/server/firefox/firefox.ts
index 9fbc409a56..1e0e4cc055 100644
--- a/packages/playwright-core/src/server/firefox/firefox.ts
+++ b/packages/playwright-core/src/server/firefox/firefox.ts
@@ -101,4 +101,3 @@ class JugglerReadyState extends BrowserReadyState {
this._wsEndpoint.resolve(undefined);
}
}
-
diff --git a/packages/playwright-core/src/server/registry/nativeDeps.ts b/packages/playwright-core/src/server/registry/nativeDeps.ts
index 6e25e3a14f..9653210a45 100644
--- a/packages/playwright-core/src/server/registry/nativeDeps.ts
+++ b/packages/playwright-core/src/server/registry/nativeDeps.ts
@@ -1104,4 +1104,3 @@ deps['debian12-arm64'] = {
...deps['debian12-x64'].lib2package,
},
};
-
diff --git a/packages/playwright-core/src/server/socksClientCertificatesInterceptor.ts b/packages/playwright-core/src/server/socksClientCertificatesInterceptor.ts
index 4e850f4a84..2517ea24ce 100644
--- a/packages/playwright-core/src/server/socksClientCertificatesInterceptor.ts
+++ b/packages/playwright-core/src/server/socksClientCertificatesInterceptor.ts
@@ -354,4 +354,4 @@ export function rewriteOpenSSLErrorIfNeeded(error: Error): Error {
'For more details, see https://github.com/openssl/openssl/blob/master/README-PROVIDERS.md#the-legacy-provider',
'You could probably modernize the certificate by following the steps at https://github.com/nodejs/node/issues/40672#issuecomment-1243648223',
].join('\n'));
-}
\ No newline at end of file
+}
diff --git a/packages/playwright-core/src/server/socksInterceptor.ts b/packages/playwright-core/src/server/socksInterceptor.ts
index 498e8bfe73..6b29636a00 100644
--- a/packages/playwright-core/src/server/socksInterceptor.ts
+++ b/packages/playwright-core/src/server/socksInterceptor.ts
@@ -83,4 +83,3 @@ export class SocksInterceptor {
function tChannelForSocks(names: '*' | string[], arg: any, path: string, context: ValidatorContext) {
throw new ValidationError(`${path}: channels are not expected in SocksSupport`);
}
-
diff --git a/packages/playwright-core/src/server/webkit/wkProvisionalPage.ts b/packages/playwright-core/src/server/webkit/wkProvisionalPage.ts
index b8af1b9ca3..6d7459c978 100644
--- a/packages/playwright-core/src/server/webkit/wkProvisionalPage.ts
+++ b/packages/playwright-core/src/server/webkit/wkProvisionalPage.ts
@@ -105,4 +105,4 @@ export class WKProvisionalPage {
assert(!frameTree.frame.parentId);
this._mainFrameId = frameTree.frame.id;
}
-}
\ No newline at end of file
+}
diff --git a/packages/playwright-core/src/utils/isomorphic/mimeType.ts b/packages/playwright-core/src/utils/isomorphic/mimeType.ts
index 2f8b9d4829..407d935281 100644
--- a/packages/playwright-core/src/utils/isomorphic/mimeType.ts
+++ b/packages/playwright-core/src/utils/isomorphic/mimeType.ts
@@ -20,4 +20,4 @@ export function isJsonMimeType(mimeType: string) {
export function isTextualMimeType(mimeType: string) {
return !!mimeType.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/);
-}
\ No newline at end of file
+}
diff --git a/packages/playwright-core/src/utils/linuxUtils.ts b/packages/playwright-core/src/utils/linuxUtils.ts
index d8e227f107..5d98c823a5 100644
--- a/packages/playwright-core/src/utils/linuxUtils.ts
+++ b/packages/playwright-core/src/utils/linuxUtils.ts
@@ -77,4 +77,3 @@ function parseOSReleaseText(osReleaseText: string): Map<string, string> {
}
return fields;
}
-
diff --git a/packages/playwright-core/src/utils/sequence.ts b/packages/playwright-core/src/utils/sequence.ts
index 27756fabeb..b063e5c488 100644
--- a/packages/playwright-core/src/utils/sequence.ts
+++ b/packages/playwright-core/src/utils/sequence.ts
@@ -63,4 +63,4 @@ export function findRepeatedSubsequences(s: string[]): { sequence: string[]; cou
}
return result;
-}
\ No newline at end of file
+}
diff --git a/packages/playwright/jsx-runtime.mjs b/packages/playwright/jsx-runtime.mjs
index 742708825e..1dfd5835aa 100644
--- a/packages/playwright/jsx-runtime.mjs
+++ b/packages/playwright/jsx-runtime.mjs
@@ -18,4 +18,4 @@ import jsxRuntime from './jsx-runtime.js';
export const jsx = jsxRuntime.jsx;
export const jsxs = jsxRuntime.jsxs;
-export const Fragment = jsxRuntime.Fragment;
\ No newline at end of file
+export const Fragment = jsxRuntime.Fragment;
diff --git a/packages/playwright/src/common/config.ts b/packages/playwright/src/common/config.ts
index 0e8babce10..a86fbb5157 100644
--- a/packages/playwright/src/common/config.ts
+++ b/packages/playwright/src/common/config.ts
@@ -298,4 +298,4 @@ const configInternalSymbol = Symbol('configInternalSymbol');
export function getProjectId(project: FullProject): string {
return (project as any).__projectId!;
-}
\ No newline at end of file
+}
diff --git a/packages/playwright/src/runner/vcs.ts b/packages/playwright/src/runner/vcs.ts
index 6f7ed55c9a..da7c4c2cc8 100644
--- a/packages/playwright/src/runner/vcs.ts
+++ b/packages/playwright/src/runner/vcs.ts
@@ -54,4 +54,4 @@ export async function detectChangedTestFiles(baseCommit: string, configDir: stri
const trackedFilesWithChanges = gitFileList(`diff ${baseCommit} --name-only`).map(file => path.join(gitRoot, file));
return new Set(affectedTestFiles([...untrackedFiles, ...trackedFilesWithChanges]));
-}
\ No newline at end of file
+}
diff --git a/packages/trace-viewer/bundle.ts b/packages/trace-viewer/bundle.ts
index eaf09a6cc3..38375f8d76 100644
--- a/packages/trace-viewer/bundle.ts
+++ b/packages/trace-viewer/bundle.ts
@@ -28,4 +28,4 @@ export function bundle(): Plugin {
},
},
};
-}
\ No newline at end of file
+}
diff --git a/packages/trace-viewer/src/sw/traceModelBackends.ts b/packages/trace-viewer/src/sw/traceModelBackends.ts
index ee694b2fba..4f8ea94c3d 100644
--- a/packages/trace-viewer/src/sw/traceModelBackends.ts
+++ b/packages/trace-viewer/src/sw/traceModelBackends.ts
@@ -160,4 +160,4 @@ export class TraceViewerServer {
return;
return response;
}
-}
\ No newline at end of file
+}
diff --git a/packages/trace-viewer/src/third_party/devtools.ts b/packages/trace-viewer/src/third_party/devtools.ts
index 27c520cbce..cc03330240 100644
--- a/packages/trace-viewer/src/third_party/devtools.ts
+++ b/packages/trace-viewer/src/third_party/devtools.ts
@@ -282,4 +282,4 @@ export async function generateFetchCall(resource: Entry, style: FetchStyle = Fet
async function fetchRequestPostData(resource: Entry) {
return resource.request.postData?._sha1 ? await fetch(`sha1/${resource.request.postData._sha1}`).then(r => r.text()) : resource.request.postData?.text;
-}
\ No newline at end of file
+}
diff --git a/packages/trace-viewer/src/ui/actionList.tsx b/packages/trace-viewer/src/ui/actionList.tsx
index 101c532aea..1deb8ecd88 100644
--- a/packages/trace-viewer/src/ui/actionList.tsx
+++ b/packages/trace-viewer/src/ui/actionList.tsx
@@ -150,4 +150,4 @@ function excludeOrigin(url: string): string {
} catch (error) {
return url;
}
-}
\ No newline at end of file
+}
diff --git a/packages/web/src/components/sourceChooser.tsx b/packages/web/src/components/sourceChooser.tsx
index 22b91c61a5..091dce8f98 100644
--- a/packages/web/src/components/sourceChooser.tsx
+++ b/packages/web/src/components/sourceChooser.tsx
@@ -59,4 +59,4 @@ export function emptySource(): Source {
label: '',
highlight: []
};
-}
\ No newline at end of file
+}
diff --git a/packages/web/src/components/splitView.spec.tsx b/packages/web/src/components/splitView.spec.tsx
index a9260a2d48..ca11520912 100644
--- a/packages/web/src/components/splitView.spec.tsx
+++ b/packages/web/src/components/splitView.spec.tsx
@@ -90,4 +90,3 @@ test('drag resize', async ({ page, mount }) => {
expect.soft(mainBox).toEqual({ x: 0, y: 0, width: 500, height: 100 });
expect.soft(sidebarBox).toEqual({ x: 0, y: 101, width: 500, height: 399 });
});
-
diff --git a/tests/android/webview.spec.ts b/tests/android/webview.spec.ts
index a0d03b69b6..fac61b5a9a 100644
--- a/tests/android/webview.spec.ts
+++ b/tests/android/webview.spec.ts
@@ -68,4 +68,4 @@ test('select webview from socketName', async function({ androidDevice }) {
await newPage.close();
await context.close();
-});
\ No newline at end of file
+});
diff --git a/tests/bidi/csvReporter.ts b/tests/bidi/csvReporter.ts
index 8fb936dd11..4986a736c3 100644
--- a/tests/bidi/csvReporter.ts
+++ b/tests/bidi/csvReporter.ts
@@ -79,4 +79,4 @@ function csvEscape(str) {
return str;
}
-export default CsvReporter;
\ No newline at end of file
+export default CsvReporter;
diff --git a/tests/bidi/expectationReporter.ts b/tests/bidi/expectationReporter.ts
index e136149cc4..65371165ff 100644
--- a/tests/bidi/expectationReporter.ts
+++ b/tests/bidi/expectationReporter.ts
@@ -86,4 +86,4 @@ function getOutcome(test: TestCase): TestExpectation {
return 'unknown';
}
-export default ExpectationReporter;
\ No newline at end of file
+export default ExpectationReporter;
diff --git a/tests/expect/toThrowMatchers.test.ts b/tests/expect/toThrowMatchers.test.ts
index a5d5e52ba8..bc64d13240 100644
--- a/tests/expect/toThrowMatchers.test.ts
+++ b/tests/expect/toThrowMatchers.test.ts
@@ -588,4 +588,4 @@ for (const toThrow of ['toThrowError', 'toThrow'] as const) {
).toThrowErrorMatchingSnapshot();
});
});
-}
\ No newline at end of file
+}
diff --git a/tests/library/browsercontext-har.spec.ts b/tests/library/browsercontext-har.spec.ts
index 4a7834013a..796a37426a 100644
--- a/tests/library/browsercontext-har.spec.ts
+++ b/tests/library/browsercontext-har.spec.ts
@@ -556,4 +556,4 @@ it('should ignore aborted requests', async ({ contextFactory, server }) => {
const result = await Promise.race([evalPromise, page2.waitForTimeout(1000).then(() => 'timeout')]);
expect(result).toBe('timeout');
}
-});
\ No newline at end of file
+});
diff --git a/tests/library/chromium/chromium.spec.ts b/tests/library/chromium/chromium.spec.ts
index 61aa811dca..910e0830ff 100644
--- a/tests/library/chromium/chromium.spec.ts
+++ b/tests/library/chromium/chromium.spec.ts
@@ -629,4 +629,4 @@ test.describe('PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS=1', () => {
const req = await requestPromise;
expect(req.headers['x-custom-header']).toBe('custom!');
});
-});
\ No newline at end of file
+});
diff --git a/tests/library/inspector/cli-codegen-test.spec.ts b/tests/library/inspector/cli-codegen-test.spec.ts
index ad68e75c48..b24871877f 100644
--- a/tests/library/inspector/cli-codegen-test.spec.ts
+++ b/tests/library/inspector/cli-codegen-test.spec.ts
@@ -122,4 +122,4 @@ test('should generate routeFromHAR with --save-har and --save-har-glob', async (
await cli.waitForCleanExit();
const json = JSON.parse(fs.readFileSync(harFileName, 'utf-8'));
expect(json.log.creator.name).toBe('Playwright');
-});
\ No newline at end of file
+});
diff --git a/tests/library/popup.spec.ts b/tests/library/popup.spec.ts
index 1dcede604b..8f2f1df7dc 100644
--- a/tests/library/popup.spec.ts
+++ b/tests/library/popup.spec.ts
@@ -288,4 +288,4 @@ async function waitForRafs(page: Page, count: number): Promise<void> {
};
window.builtinRequestAnimationFrame(onRaf);
}), count);
-}
\ No newline at end of file
+}
diff --git a/tests/page/frame-evaluate.spec.ts b/tests/page/frame-evaluate.spec.ts
index 16bcf6eac7..6908f03e86 100644
--- a/tests/page/frame-evaluate.spec.ts
+++ b/tests/page/frame-evaluate.spec.ts
@@ -180,4 +180,3 @@ it('evaluateHandle should work', async ({ page, server }) => {
const windowHandle = await mainFrame.evaluateHandle(() => window);
expect(windowHandle).toBeTruthy();
});
-
diff --git a/tests/page/locator-misc-2.spec.ts b/tests/page/locator-misc-2.spec.ts
index b32913faba..202b9a2957 100644
--- a/tests/page/locator-misc-2.spec.ts
+++ b/tests/page/locator-misc-2.spec.ts
@@ -173,4 +173,3 @@ it('Locator.locator() and FrameLocator.locator() should accept locator', async (
expect(await divLocator.locator('input').inputValue()).toBe('outer');
expect(await page.frameLocator('iframe').locator(divLocator).locator('input').inputValue()).toBe('inner');
});
-
diff --git a/tests/page/page-event-request.spec.ts b/tests/page/page-event-request.spec.ts
index 2c1d7a7eba..e1fc29eb59 100644
--- a/tests/page/page-event-request.spec.ts
+++ b/tests/page/page-event-request.spec.ts
@@ -272,4 +272,4 @@ it('<picture> resource should have type image', async ({ page }) => {
`)
]);
expect(request.resourceType()).toBe('image');
-});
\ No newline at end of file
+});
diff --git a/tests/page/page-mouse.spec.ts b/tests/page/page-mouse.spec.ts
index f93ca4e2e2..7f4ce8a85d 100644
--- a/tests/page/page-mouse.spec.ts
+++ b/tests/page/page-mouse.spec.ts
@@ -309,4 +309,3 @@ it('should dispatch mouse move after context menu was opened', async ({ page, br
}
}
});
-
diff --git a/tests/page/page-request-fulfill.spec.ts b/tests/page/page-request-fulfill.spec.ts
index 3edcd0ba0a..0d939a0a5c 100644
--- a/tests/page/page-request-fulfill.spec.ts
+++ b/tests/page/page-request-fulfill.spec.ts
@@ -485,4 +485,3 @@ it('should not go to the network for fulfilled requests body', {
expect(body).toBeTruthy();
expect(serverHit).toBe(false);
});
-
diff --git a/tests/page/selectors-react.spec.ts b/tests/page/selectors-react.spec.ts
index ce47f1bb25..c7bfc3f68a 100644
--- a/tests/page/selectors-react.spec.ts
+++ b/tests/page/selectors-react.spec.ts
@@ -176,4 +176,3 @@ for (const [name, url] of Object.entries(reacts)) {
});
});
}
-
diff --git a/tests/page/selectors-vue.spec.ts b/tests/page/selectors-vue.spec.ts
index 175e1246ee..71b60d1cb3 100644
--- a/tests/page/selectors-vue.spec.ts
+++ b/tests/page/selectors-vue.spec.ts
@@ -168,4 +168,3 @@ for (const [name, url] of Object.entries(vues)) {
});
});
}
-
diff --git a/tests/playwright-test/command-line-filter.spec.ts b/tests/playwright-test/command-line-filter.spec.ts
index 8937694b39..e33cb8b318 100644
--- a/tests/playwright-test/command-line-filter.spec.ts
+++ b/tests/playwright-test/command-line-filter.spec.ts
@@ -195,4 +195,4 @@ test('should focus a single test suite', async ({ runInlineTest }) => {
expect(result.skipped).toBe(0);
expect(result.report.suites[0].suites[0].suites[0].specs[0].title).toEqual('pass2');
expect(result.report.suites[0].suites[0].suites[0].specs[1].title).toEqual('pass3');
-});
\ No newline at end of file
+});
diff --git a/tests/playwright-test/only-changed.spec.ts b/tests/playwright-test/only-changed.spec.ts
index 5a9c6ee121..00614598de 100644
--- a/tests/playwright-test/only-changed.spec.ts
+++ b/tests/playwright-test/only-changed.spec.ts
@@ -427,4 +427,3 @@ test('exits successfully if there are no changes', async ({ runInlineTest, git,
expect(result.exitCode).toBe(0);
});
-
diff --git a/tests/playwright-test/playwright.reuse.browser.spec.ts b/tests/playwright-test/playwright.reuse.browser.spec.ts
index bccce95b3e..4340550f64 100644
--- a/tests/playwright-test/playwright.reuse.browser.spec.ts
+++ b/tests/playwright-test/playwright.reuse.browser.spec.ts
@@ -148,4 +148,4 @@ test('should produce correct test steps', async ({ runInlineTest, runServer }) =
'onStepEnd fixture: context',
'onStepEnd After Hooks'
]);
-});
\ No newline at end of file
+});
diff --git a/tests/playwright-test/reporter-blob.spec.ts b/tests/playwright-test/reporter-blob.spec.ts
index 91b32e76a2..5ddb271b70 100644
--- a/tests/playwright-test/reporter-blob.spec.ts
+++ b/tests/playwright-test/reporter-blob.spec.ts
@@ -2052,4 +2052,4 @@ test('project filter in report name', async ({ runInlineTest }) => {
const reportFiles = await fs.promises.readdir(reportDir);
expect(reportFiles.sort()).toEqual(['report-foo-b-r-6d9d49e-1.zip']);
}
-});
\ No newline at end of file
+});
diff --git a/tests/playwright-test/reporter-dot.spec.ts b/tests/playwright-test/reporter-dot.spec.ts
index 5afda3f7bd..04a9337ec0 100644
--- a/tests/playwright-test/reporter-dot.spec.ts
+++ b/tests/playwright-test/reporter-dot.spec.ts
@@ -112,4 +112,4 @@ for (const useIntermediateMergeReport of [false, true] as const) {
colors.green('·').repeat(3));
});
});
-}
\ No newline at end of file
+}
diff --git a/tests/playwright-test/reporter-github.spec.ts b/tests/playwright-test/reporter-github.spec.ts
index 100feb157f..292c407b9f 100644
--- a/tests/playwright-test/reporter-github.spec.ts
+++ b/tests/playwright-test/reporter-github.spec.ts
@@ -98,4 +98,4 @@ for (const useIntermediateMergeReport of [false, true] as const) {
expect(result.exitCode).toBe(1);
});
});
-}
\ No newline at end of file
+}
diff --git a/tests/playwright-test/reporter-junit.spec.ts b/tests/playwright-test/reporter-junit.spec.ts
index 2b182e00c0..9947484903 100644
--- a/tests/playwright-test/reporter-junit.spec.ts
+++ b/tests/playwright-test/reporter-junit.spec.ts
@@ -594,4 +594,4 @@ for (const useIntermediateMergeReport of [false, true] as const) {
expect(time).toBeGreaterThan(1);
});
});
-}
\ No newline at end of file
+}
diff --git a/tests/playwright-test/reporter-line.spec.ts b/tests/playwright-test/reporter-line.spec.ts
index 22441d567a..7322af433f 100644
--- a/tests/playwright-test/reporter-line.spec.ts
+++ b/tests/playwright-test/reporter-line.spec.ts
@@ -189,4 +189,4 @@ for (const useIntermediateMergeReport of [false, true] as const) {
expect(result.exitCode).toBe(1);
});
});
-}
\ No newline at end of file
+}
diff --git a/tests/playwright-test/reporter-list.spec.ts b/tests/playwright-test/reporter-list.spec.ts
index 752d29c649..1d488cc253 100644
--- a/tests/playwright-test/reporter-list.spec.ts
+++ b/tests/playwright-test/reporter-list.spec.ts
@@ -319,4 +319,3 @@ function simpleAnsiRenderer(text, ttyWidth) {
return screenLines.map(line => line.join('')).join('\n');
}
-
diff --git a/tests/playwright-test/reporter-markdown.spec.ts b/tests/playwright-test/reporter-markdown.spec.ts
index 076e28d66e..558a1f8a84 100644
--- a/tests/playwright-test/reporter-markdown.spec.ts
+++ b/tests/playwright-test/reporter-markdown.spec.ts
@@ -157,4 +157,4 @@ test('report with worker error', async ({ runInlineTest }) => {
**0 passed**
:heavy_check_mark::heavy_check_mark::heavy_check_mark:
`);
-});
\ No newline at end of file
+});
diff --git a/tests/playwright-test/snapshot-path-template.spec.ts b/tests/playwright-test/snapshot-path-template.spec.ts
index 4f260469b7..2fd79403f4 100644
--- a/tests/playwright-test/snapshot-path-template.spec.ts
+++ b/tests/playwright-test/snapshot-path-template.spec.ts
@@ -137,4 +137,3 @@ test('arg should receive default arg', async ({ runInlineTest }, testInfo) => {
expect(result.output).toContain(`A snapshot doesn't exist at ${snapshotOutputPath}, writing actual`);
expect(fs.existsSync(snapshotOutputPath)).toBe(true);
});
-
diff --git a/tests/playwright-test/test-ignore.spec.ts b/tests/playwright-test/test-ignore.spec.ts
index b552380faa..17e3b3adae 100644
--- a/tests/playwright-test/test-ignore.spec.ts
+++ b/tests/playwright-test/test-ignore.spec.ts
@@ -370,4 +370,4 @@ test('should always work with unix separators', async ({ runInlineTest }) => {
expect(result.passed).toBe(1);
expect(result.report.suites.map(s => s.file).sort()).toEqual(['a.test.ts']);
expect(result.exitCode).toBe(0);
-});
\ No newline at end of file
+});
diff --git a/tests/playwright-test/test-use.spec.ts b/tests/playwright-test/test-use.spec.ts
index 8a2bcd2401..1687cbe2e7 100644
--- a/tests/playwright-test/test-use.spec.ts
+++ b/tests/playwright-test/test-use.spec.ts
@@ -186,4 +186,3 @@ test('test.use() should throw if called from beforeAll ', async ({ runInlineTest
expect(result.exitCode).toBe(1);
expect(result.output).toContain('Playwright Test did not expect test.use() to be called here');
});
-
diff --git a/tests/playwright-test/ui-mode-test-annotations.spec.ts b/tests/playwright-test/ui-mode-test-annotations.spec.ts
index eeff6a5aca..cc1f0b5f04 100644
--- a/tests/playwright-test/ui-mode-test-annotations.spec.ts
+++ b/tests/playwright-test/ui-mode-test-annotations.spec.ts
@@ -46,4 +46,3 @@ test('should display annotations', async ({ runUITest }) => {
await expect(annotations.locator('.annotation-item').filter({ hasText: 'test repo' }).locator('a'))
.toHaveAttribute('href', 'https://github.com/microsoft/playwright');
});
-
diff --git a/utils/doclint/linting-code-snippets/cli.js b/utils/doclint/linting-code-snippets/cli.js
index 5d3200aa9e..7139bb105a 100644
--- a/utils/doclint/linting-code-snippets/cli.js
+++ b/utils/doclint/linting-code-snippets/cli.js
@@ -153,6 +153,7 @@ class JSLintingService extends LintingService {
'@typescript-eslint/no-unused-vars': 'off',
'max-len': ['error', { code: 100 }],
'react/react-in-jsx-scope': 'off',
+ 'eol-last': 'off',
},
}
});