![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
eslint-plugin-react-perf
Advanced tools
Performance-minded React linting rules for ESLint (motivated by esamatti's post "React.js pure render performance anti-pattern").
$ npm i eslint-plugin-react-perf
Add plugins
section and specify eslint-plugin-react-perf as a plugin.
{
"plugins": ["react-perf"]
}
{...}
as JSX prop value[...]
as JSX prop valuefunction
as JSX prop valueAs of v3.3.0, each eslint-plugin-react-perf rule supports configuration to control whether native elements (lower case first letter React components) are ignored.
With this configuration, all native elements are ignored for this rule:
{
"react-perf/jsx-no-new-object-as-prop": [
"error",
{
"nativeAllowList": "all"
}
]
}
With this configuration, the "style" attribute is ignored for native elements for this rule:
{
"react-perf/jsx-no-new-object-as-prop": [
"error",
{
"nativeAllowList": ["style"]
}
]
}
This plugin exports a recommended
configuration that enforce React good practices.
To enable this configuration add the following to your eslint.config.js:
import reactPerfPlugin from 'eslint-plugin-react-perf';
const config = [
reactPerfPlugin.configs.flat.recommended
];
export default config;
To enable this configuration use the extends
property in your .eslintrc
config file:
{
"extends": ["plugin:react-perf/recommended"]
}
See ESLint documentation for more information about extending configuration files.
The rules enabled in this configuration are:
This plugin also exports an all
configuration that includes every available rule.
To enable this configuration add the following to your eslint.config.js:
import reactPerfPlugin from 'eslint-plugin-react-perf';
const config = [
reactPerfPlugin.configs.flat.all
];
export default config;
{
"plugins": [
"react-perf"
],
"extends": ["plugin:react-perf/all"]
}
Try out cvazac/test-ref-pattern.
eslint-plugin-react-perf is licensed under the MIT License.
FAQs
Performance-minded React linting rules for ESLint
The npm package eslint-plugin-react-perf receives a total of 23,290 weekly downloads. As such, eslint-plugin-react-perf popularity was classified as popular.
We found that eslint-plugin-react-perf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.