Flat Config (eslint.config.js) ForESLint 9.0.0 and aboveusers, add therecommended-latestconfig. importreactHooksfrom'eslint-plugin-react-hooks';exportdefault[// ...reactHooks.configs['recommended-latest'],]; Cu
Flat Config (eslint.config.js|ts)Import pluginReactRef and add pluginReactRef.configs.recommended to the extends array of your configuration file:import { defineConfig } from "eslint/config"; import pluginReactRef from "eslint-plugin-react-ref"; export default defineConfig([ { extends: [...
constnx=require("@nx/eslint-plugin")nx.configs["flat/react"] breaks because I've already declared the plugin in my globaleslint.config.jsin order to specify my own rules. Expected Behavior I should be able to overrideeslint-plugin-importrules in the rooteslint.config.jsfile without having...
According to the docs foreslint-plugin-react-hooks, there should be a flat config compatible config available atreactHooks.configs['recommended-latest']. The only config that exists in the version published on npm isrecommended, which does not work with ESLint 9 and flat config. By exploring ...
The new host config shape is flat and doesn't use nested objects. (@gaearon in #12792) 16.3.3 (August 1, 2018)React DOM ServerFix a potential XSS vulnerability when the attacker controls an attribute name (CVE-2018-6341). This fix is available in the latest `react-dom@16.4.2, as ...
constreactPlugin=require('eslint-plugin-react');module.exports=[…reactPlugin.configs.flat.recommended,// This is not a plugin object, but a shareable config objectreactPlugin.configs.flat['jsx-runtime'],// Add this if you are using React 17+…]; ...
Flat configEdit your eslint 8+ config (for example eslint.config.mjs) with the recommended configuration:+ import reactCompiler from "eslint-plugin-react-compiler" import react from "eslint-plugin-react" export default [ // Your existing config { ...pluginReact.configs.flat.recommended, ...
The above example is same as the example below, as the new config system is based on chaining. constreactPlugin=require('eslint-plugin-react');constglobals=require('globals');module.exports=[…{files:['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],...reactPlugin.configs.flat.recommended...
React version: 19.0.0 eslint-plugin-react-hooks: 5.2.0 Steps To Reproduce Follow installation instruction for flat config: https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks#installation Link to code example: ...
no-array-index-key: consider flatMap (#3530 @k-yle) jsx-curly-brace-presence: handle single and only expression template literals (#3538 @taozhou-glean) no-unknown-property: allow onLoad on source (@ljharb) jsx-first-prop-new-line: ensure autofix preserves generics in component name (#3546...