Socket
Socket
Sign inDemoInstall

eslint-plugin-react-perf

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react-perf

Performance-minded React linting rules for ESLint


Version published
Weekly downloads
172K
increased by13.26%
Maintainers
2
Weekly downloads
 
Created
Source

eslint-plugin-react-perf

Performance-minded React linting rules for ESLint

Installation

$ npm i eslint-plugin-react-perf

Configuration

Add plugins section and specify eslint-plugin-react-perf as a plugin.

{
  "plugins": [
    "react-perf"
  ]
}

List of supported rules

  • react-perf/jsx-no-new-object-as-prop: Prevent {...} as JSX prop value
  • react-perf/jsx-no-new-array-as-prop: Prevent [...] as JSX prop value
  • react-perf/jsx-no-new-function-as-prop: Prevent function as JSX prop value
  • react-perf/jsx-no-jsx-as-prop: Prevent JSX as JSX prop value

This plugin exports a recommended configuration that enforce React good practices.

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:

All

This plugin also exports an all configuration that includes every available rule.

{
  "plugins": [
    "react-perf"
  ],
  "extends": ["plugin:react-perf/all"]
}

Test anti-patterns in runtime

Try out cvazac/test-ref-pattern.

License

eslint-plugin-react-perf is licensed under the MIT License.

Keywords

FAQs

Package last updated on 09 Feb 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc