
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
eslint-plugin-react-ts
Advanced tools
ESLint plugin for React and Preact function components with TypeScript, built from scratch (almost).
ESLint plugin for React and Preact function components with TypeScript, built from scratch (almost).
Warning This plugin is still in early development, and will likely change significantly before reaching a stable version.
# npm
npm install --save-dev eslint-plugin-react-ts
# pnpm
pnpm add --save-dev eslint-plugin-react-ts
# yarn
yarn add --dev eslint-plugin-react-ts
# bun
bun add --dev eslint-plugin-react-ts
.eslintrc
{
"extends": [
"plugin:react-ts/recommended"
],
"rules": {
"react-ts/<rule-name>": "error"
}
}
eslint.config.js
(requires eslint >= v8.23.0)import reactTsRecommended from "eslint-plugin-react-ts/configs/recommended";
export default [
reactTsRecommended,
{
rules: {
"react-ts/<rule-name>": "error",
// ...
},
},
];
💼 Configurations enabled in.
⚠️ Configurations set to warn in.
👍 Set in the recommended
configuration.
🔍 Set in the recommended-type-checked
configuration.
Name | Description | 💼 | ⚠️ |
---|---|---|---|
debug/function-component | reports all function components, including anonymous ones |
Name | Description | 💼 | ⚠️ |
---|---|---|---|
jsx/no-leaked-conditional-rendering | disallow problematic leaked values from being rendered | 👍 🔍 | |
jsx/no-misused-comment-in-textnode | disallow comments from being inserted as text nodes | 👍 🔍 | |
jsx/prefer-shorthand-boolean | enforce boolean attributes notation in JSX | 👍 🔍 |
Name | Description | 💼 | ⚠️ |
---|---|---|---|
naming-convention/event-handler | enforce event handler naming conventions in JSX | ||
naming-convention/filename | enforce naming convention for jsx files | ||
naming-convention/filename-extension | enforce using .ts instead of .tsx extension when there is no JSX in the file |
Name | Description | 💼 | ⚠️ |
---|---|---|---|
no-constructed-context-value | disallows passing constructed values to context providers | 👍 🔍 | |
no-dangerously-set-innerhtml | disallow when a DOM element is using both children and dangerouslySetInnerHTML' | 👍 🔍 | |
no-dangerously-set-innerhtml-with-children | disallow when a DOM element is using both children and dangerouslySetInnerHTML' | 👍 🔍 | |
no-deprecated-string-refs | disallow using deprecated string refs | 👍 🔍 | |
no-unstable-default-props | disallow usage of referential-type variables as default param in function component | 👍 🔍 |
react-ts/jsx/prefer-shorthand-boolean
react-ts/jsx/no-leaked-conditional-rendering
react-ts/jsx/no-misused-comment-in-textnode
react-ts/jsx/no-useless-fragment
react-ts/jsx/no-missing-key-prop
react-ts/jsx/no-array-index-key
react-ts/naming-convention/event-handler
react-ts/naming-convention/filename
react-ts/naming-convention/filename-extension
react-ts/no-constructed-context-value
react-ts/no-dangerously-set-innerhtml
react-ts/no-dangerously-set-innerhtml-with-children
react-ts/no-deprecated-string-refs
react-ts/no-unstable-default-props
react-ts/no-unstable-nested-components
react-ts/no-missing-display-name
react-ts/no-direct-mutation-state
react-ts/jsx/no-complicated-conditional-rendering
react-ts/hooks/no-suppressing-exhaustive-deps
react-ts/no-access-ref-current-during-rendering
react-ts/no-legacy-children-methods
react-ts/no-legacy-class-components
react-ts/no-legacy-clone-element
react-ts/no-legacy-createRef
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
ESLint plugin for React and Preact function components with TypeScript, built from scratch (almost).
The npm package eslint-plugin-react-ts receives a total of 0 weekly downloads. As such, eslint-plugin-react-ts popularity was classified as not popular.
We found that eslint-plugin-react-ts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.