
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
eslint-config-react
Advanced tools
A set of opinionated ESLint rules (all rules included) tailored for React projects
A set of opinionated ESLint (http://eslint.org) rules (all rules included) tailored for React projects
npm install --save-dev eslint-config-react babel-eslint eslint-plugin-react
.eslintrc
in your project:{
"extends": "react"
// Your overrides...
}
Read about all the rules here: http://eslint.org/docs/rules/
React plugin rules: https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules
Removed a bunch of rules about method order, especially the ones that is not really relevant with ES6 anymore
Removed env from config. That should be set per project, especially since it can't be overriden.
arrow-parens: You should be allowed to omit parens if only one parameter (2 -> 0)
prefer-spread: Moving to ES6, this should be default.
prefer-reflect: Moving to ES6, this should be default.
react/forbid-prop-types: Forbid the usage of React.PropTypes.any, it doesn't say anything really.
react/jsx-closing-bracket-location: Don't care
react/jsx-indent-props: Don't specify any.
react/jsx-quotes: Again don't care, altho I thin "" makes more sense
react/no-direct-mutation-state: If you do this, you should be sent to React prison :)
react/no-set-state: Entirely project specific.
react/sort-comp: Order custom component* (lifecycle) methods before other custom methods.
prefer-const: Disabled since it's very annoying when you have variables that will be changeable later on. const is a very nice concept that should be used for stuff that are actually constants.
Name change. This is a config for React projects.
jsx-quotes: The react/jsx-quotes rule is deprecated. Using the jsx-quotes rule instead.
no-unused-vars: Ignore React as unused variable. Because you need to import React for JSX (it will reference that variable) without you specifically referencing it.
FAQs
A set of opinionated ESLint rules (all rules included) tailored for React projects
We found that eslint-config-react 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.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.