# tslint-react **Repository Path**: trusted-list/tslint-react ## Basic Information - **Project Name**: tslint-react - **Description**: :orange_book: Lint rules related to React & JSX for TSLint. - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-09-08 - **Last Updated**: 2026-09-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README [![NPM version](https://badge.fury.io/js/tslint-react.svg)](https://www.npmjs.com/package/tslint-react) [![Downloads](http://img.shields.io/npm/dm/tslint-react.svg)](https://npmjs.org/package/tslint-react) [![Circle CI](https://circleci.com/gh/palantir/tslint-react.svg?style=svg)](https://circleci.com/gh/palantir/tslint-react) tslint-react ------------ Lint rules related to React & JSX for [TSLint](https://github.com/palantir/tslint/). ### Usage tslint-react has peer dependencies on TSLint and TypeScript. To use these lint rules with the default preset, use configuration inheritance via the `extends` keyword. Here's a sample configuration where `tslint.json` lives adjacent to your `node_modules` folder: ```js { "extends": ["tslint:latest", "tslint-react"], "rules": { // override tslint-react rules here "jsx-wrap-multiline": false } } ``` To lint your `.ts` **and** `.tsx` files you can simply run `tslint -c tslint.json 'src/**/*.{ts,tsx}'`. ### Semantic versioning The built-in configuration preset you get with `"extends": "tslint-react"` is semantically versioned in a manner similar to TSLint's built-in presets and the TypeScript language itself. As new rules are added to tslint-react across minor versions, stricter checks may be enabled here. Your code is not guaranteed to continue passing checks across these version bumps. If you wish to ensure that `npm upgrade` or `yarn upgrade` never breaks your build, declare a tilde dependency on this package (e.g. `"~1.0.0"`). ### Rules - `jsx-alignment` - Enforces a consistent style for multiline JSX elements which promotes ease of editing via line-wise manipulations as well as maintainability via small diffs when changes are made. ```ts // Good: const element =
{children}
; // Also Good: ; // good const button = ( ); ``` ### Development We track rule suggestions on Github issues -- [here's a useful link](https://github.com/palantir/tslint-react/issues?q=is%3Aissue+is%3Aopen+label%3A%22Type%3A+Rule+Suggestion%22) to view all the current suggestions. Tickets are roughly triaged by priority (P1, P2, P3). We're happy to accept PRs for new rules, especially those marked as [Status: Accepting PRs](https://github.com/palantir/tslint-react/issues?q=is%3Aissue+is%3Aopen+label%3A%22Status%3A+Accepting+PRs%22). If submitting a PR, try to follow the same style conventions as the [core TSLint project](https://github.com/palantir/tslint). Quick Start (requires Node v6+, yarn v0.22+): 1. `yarn` 1. `yarn verify` 1. `yarn lint` ### Changelog See the Github [release history](https://github.com/palantir/tslint-react/releases).