Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
eslint-plugin-jsx-extras
Advanced tools
A set of Eslint plug-ins for app specific JSX based rules.
Currently this package has a single rule which is being used for the upclose.me website:
This rule disallows the use of string literals (other than numbers) in a JSX expression. It exists so that a developer doesn't accidentally forget to put localized strings for a component.
This rule is for using ES6 classes with flowtypes. It warns you if you are exporting a React ES6 class while passing it through a function:
export default autobind(MyReactClass)
This will work fine:
const toExport = autobind(MyReactClass)
export default toExport
As such this rule isn't perfect. You should be annotating the type for toExport
:
const toExport: typeof MyReactClass = autobind(MyReactClass)
export default toExport
Some rules that I'm currently working on:
multiline-attributes-align: To check that JSX attributes are either limited to a single line or the attributes all match the same indentation.
jsx-like-html: To check that a <br />
tag is always self closing, while a <span></span>
tag is never self closing.
jsx-ternary: To enforce indentation rules for ternary expressions in JSX.
jsx-function-bind: For ES6 classes, a rule that will check that you use .bind(this)
for callback functions in JSX.
FAQs
A set of eslint rules to do custom JSX checks
The npm package eslint-plugin-jsx-extras receives a total of 0 weekly downloads. As such, eslint-plugin-jsx-extras popularity was classified as not popular.
We found that eslint-plugin-jsx-extras demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.