Rules Overview
Lynx Doctor rules are an executable distillation of Lynx community skills. Rules have a first-level category and a second-level subcategory.
The CLI category field uses the first-level domain: reactlynx, lynx-ui, rspeedy, or lynx-css.
reactlynx
Source skill: reactlynx-best-practices
Additional sources: lynx-typescript · lynx-api-docs
threading
reactlynx/background-only-api: detectslynx.getJSModuleandNativeModulesoutside an obvious background-only context.
lifecycle
reactlynx/avoid-use-layout-effect: flagsuseLayoutEffect, which does not provide React DOM style synchronous layout behavior in ReactLynx.
events
reactlynx/main-thread-handler-directive: checks thatmain-thread:*event handlers point at functions with a top-level"main thread"directive.
configuration
reactlynx/global-props-event-mode: warns whenglobalPropsModeiseventwhile code readslynx.__globalPropsdirectly withoutuseGlobalPropsChanged.reactlynx/typescript-jsx-import-source: checkstsconfig.jsonforjsxImportSourceandisolatedModulessettings expected by ReactLynx and Rspeedy.reactlynx/types-package-missing: warns when a ReactLynx package does not declare@lynx-js/types.
performance
reactlynx/lazy-without-suspense: detects lazy component loading without an obviousSuspenseboundary in the same file.
elements and packaging
reactlynx/no-dom-elements: warns about common Web elements in Lynx source.reactlynx/native-element-events: checks Web event props on known native elements.reactlynx/library-runtime-entry: warns about universal TS/TSX runtime entries in component libraries.reactlynx/library-missing-artifact: with--package, checks literal runtime/declaration files after building.
lynx-ui
Source skill: lynx-ui
imports
lynx-ui/prefer-public-aggregate-import: warns when code imports directly from@lynx-js/lynx-ui-*component packages.
component-api
lynx-ui/button-uses-on-click: detectsButtonusage with nativebind*orcatch*tap handlers instead of the documentedonClickprop.
gestures
lynx-ui/gesture-components-enable-new-gesture: warns when gesture-driven lynx-ui components are used withoutenableNewGesture: true.
rspeedy
Source skill: rspeedy-bundle-size
bundle-size
rspeedy/no-export-star-barrels: detectsexport *barrel files that can defeat tree-shaking and pull extra code into rspeedy bundles.rspeedy/no-eval-in-bundle-code: detectseval()in source files because it can poison production name mangling in bundled output.
List local rules:
Explain one rule:
lynx-css
See CSS compatibility for lynx-css/unsupported, lynx-css/requires-newer-version, and lynx-css/conditional-support, including explicit targets and unknown coverage.
