Commit graph

19 commits

Author SHA1 Message Date
Simon Knott b599335404
chore(ui): enable react/recommended lint rules (#32214)
Closes https://github.com/microsoft/playwright/issues/32159. I
originally set out to enable Strict Mode for our React UI, but found a
way better thing: Enabling the lint rules we had already installed!

`eslint-plugin-react` is already in of our `package.json`, and this PR
enables it and fixes some of the reported issues. Most of them are
around the `key` prop which is mostly about performance, but there's
also fixes for misspelled `data-testid` props.
2024-08-20 14:16:28 +02:00
Simon Knott 4d4ed2a5c4
chore: enforce single quotes in JSX (#31855)
Discovered in
https://github.com/microsoft/playwright/pull/31852#discussion_r1691133106:
We're not enforcing single quotes for JSX, and it shows! We need to
start enforcing it to prevent even greater damage from being done ;D
2024-07-25 13:06:26 +02:00
Pavel Feldman 9d0430fa26
chore: strengthen linting (#29669) 2024-02-26 16:52:28 -08:00
Pavel Feldman 7eb910a652
chore: enable eslint for js (#29639) 2024-02-26 09:39:21 -08:00
Jérémy Lal 840a1f6436
chore: replace __proto__ by getPrototypeOf (#17386) 2022-09-20 19:01:12 -07:00
Max Schmitt 7e2aec7454
chore: align more ESLint rules with VSCode formatting (#16647) 2022-08-18 20:12:33 +02:00
Pavel Feldman 5ae2017a5b
chore: always import type (#13365) 2022-04-06 14:57:14 -07:00
Max Schmitt cd22072685
chore: enable object-curly-spacing in ESLint (#9168) 2021-09-27 18:58:08 +02:00
Dmitry Gozman ec7d37d92f
chore: update eslint config (#6840) 2021-06-02 08:41:48 -07:00
Max Schmitt ac0980e1ee
chore(linting): enable required semicolons rule in TS (#6701) 2021-05-24 00:09:46 +02:00
Dmitry Gozman 2e05feac25
feat(cli): bring in trace viewer (#4920) 2021-01-07 16:15:34 -08:00
Joel Einbinder 6697dadca2
chore(eslint): add rule no-unused-expressions (#4848) 2020-12-29 09:59:35 -08:00
Pavel Feldman a20bb949ea
chore(testrunner): introduce test result, reuse it in ipc (#3644) 2020-08-26 14:14:23 -07:00
Joel Einbinder 8611ee8df7
chore(testrunner): typescript test files (#2751)
This lets our spec files be .ts instead of just .js. The typescript files will be checked against the public types. Tests are compiled with babel just in time before running them, emulating the jest experience. TypeScript tests are also linted with eslint.

I converted keyboard.spec.js as the first demo. I'll follow up converting some more more tests.
2020-07-08 00:20:36 -07:00
Joel Einbinder 6ed8b5fcc6
chore(eslint): lint for copyrights on files (#2858) 2020-07-07 11:12:45 -07:00
Joel Einbinder 73148fda79
chore(lint): add @typescript-eslint/no-unnecessary-type-assertion rule (#898) 2020-02-07 13:38:50 -08:00
Joel Einbinder 487d394f3b
chore(lint): add @typescript-eslint/type-annotation-spacing rule (#897) 2020-02-07 13:36:49 -08:00
Pavel Feldman 66d3dd8626
lint: fixes (#85) 2019-11-26 08:19:02 -08:00
Pavel Feldman 9ba375c063 Initial commit 2019-11-19 10:58:15 -08:00