@tsrx/eslint-plugin
v0.4.12
Published
ESLint plugin for TSRX
Readme
@tsrx/eslint-plugin
ESLint rules and flat configurations for target-neutral TSRX syntax.
Installation
pnpm add --save-dev eslint @tsrx/eslint-parser @tsrx/eslint-pluginUsage
// eslint.config.js
import tsrx from '@tsrx/eslint-plugin';
export default [...tsrx.configs.recommended];The recommended configuration:
- uses
@tsrx/eslint-parserfor.tsrxfiles when installed; - uses
@typescript-eslint/parserfor.tsand.tsxfiles when installed; - registers the plugin under the
tsrxrule namespace; - ignores declaration files, dependencies, and common build output folders.
Use the strict configuration to enable the same syntax rules at error severity:
import tsrx from '@tsrx/eslint-plugin';
export default [...tsrx.configs.strict];Rules
tsrx/control-flow-jsxrequires template output in returned@forblocks.tsrx/require-statement-container-bodydetects component bodies that need the@{ ... }statement-container marker.tsrx/valid-for-of-keyvalidates identifiers used in TSRX loop keys.tsrx/no-return-in-componentis a deprecated no-op retained for compatibility.
Target runtime rules do not belong in the shared recommended configuration. For
example, Ripple-specific track() placement and DOM event guidance should be
provided by Ripple-owned tooling rather than applied to every TSRX target.
See the TSRX documentation and
@tsrx/eslint-parser.
