
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
@fullstory/eslint-plugin-annotate-react
Advanced tools
An ESLint plugin for annotating React components.
An ESLint plugin for adding 'data-attribute' to React components. The purpose of this plugin is to automatically make css selectors. Here is an example:
const MyComponent = () => (
<div />
);
This plugin will autofix and add the data-component
prop to the div:
const MyComponent = () => (
<div data-component="MyComponent" />
);
This plugin is intended to not be too opinionated. In general the approach is to suggest to the developer to add 'data-component' when there is an obvious approach, but in questionable cases, the plugin will tend towards being quiet. Click to learn more about the covered cases.
Note: This plugin cannot guarantee that the data-component
prop will actually make it to the DOM node if the top level element is another React component. For it to work effectively, make sure you are properly forwarding props with the JSX spread syntax.
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install @fullstory/eslint-plugin-annotate-react
:
npm install @fullstory/eslint-plugin-annotate-react --save-dev
Add @fullstory/eslint-plugin-annotate-react
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["@fullstory/annotate-react"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"@fullstory/annotate-react/data-component": "error"
}
}
Tests can be ran using
npm run test
...
Run this command to bump the version, push the tag, and create the release on GitHub:
npx np <patch | minor | major> --no-publish --no-tests
FAQs
An ESLint plugin for annotating React components.
The npm package @fullstory/eslint-plugin-annotate-react receives a total of 40 weekly downloads. As such, @fullstory/eslint-plugin-annotate-react popularity was classified as not popular.
We found that @fullstory/eslint-plugin-annotate-react 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.