Files
react-native-devtools-frontend/scripts/eslint_rules
Andrés Olivares 763593787a [ESLint] Report all .only expressions in DevTools' tests
At the moment, we use the no-exclusive-tests plugin to ban exclusive
tests in the test/ repo. This is problematic because the rule doesn't
work for the mocha extensions we use in DevTools (like
describeWithMockConnection, etc.), meaning that exclusive tests like [1]
can slip through the lint check.

This CL adds a new rule that prevents call statements with the shape
statement.only in the test base to account for this. The rule is applied
to files ending with _test.ts and the previous rule is removed.

[1] https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3898961/23/test/unittests/front_end/panels/timeline/SourceMaps_test.ts#80
 (line 80)

 Bug: none
Change-Id: If0e6ac9810c80da067faa1f2158b8bd45f8417f8
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3963115
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Andres Olivares <andoli@chromium.org>
2022-10-18 15:13:38 +00:00
..