Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
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).
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.