mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-09-30 01:07:01 +08:00
Bug: 400353541 Change-Id: Iab1b2a5b596ca7efe4922124253947419d41a2d2 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6407493 Reviewed-by: Philip Pfaffe <pfaffe@chromium.org> Commit-Queue: Danil Somsikov <dsv@chromium.org>
Custom ESLint rules for Chromium DevTools
The lib/ folder contains a set of ESLint rules
specific to Chromium DevTools. These rules are executed as part of the
npm run lint
command and implicitly via the Presubmit checks.
We follow the ESLint Rule Naming Conventions
and consistently use dashes to separate words (instead of underscores), and prefix
all rules that disallow something with no-.
Testing the rules
When writing a custom ESLint rule, place the logic into a file lib/foo.js and
add a corresponding test for the logic to tests/foo.test.js.
You can use
npm run test -- ./scripts/eslint_rules/tests
to run the tests for the custom ESLint rules.