We're currently hardcoding experimental options to `eslint-plugin-react-hooks`. This blocks the release on features that might not be ready. This PR extends the ReactFeatureFlag infra to support flags for `eslint-plugin-react-hooks`. An alternative would be to create a separate flag system for build tools, but for now we have a small number of these and reusing existing infra seems like the simplest approach. I ran a full `yarn build` and checked the output resolved the flag values as expected: _build/oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js_ ```js var eprh_enableUseKeyedStateCompilerLint = false; var eprh_enableVerboseNoSetStateInEffectCompilerLint = false; var eprh_enableExhaustiveEffectDependenciesCompilerLint = 'off'; ``` _build/facebook-www/ESLintPluginReactHooks-dev.classic.js_ ```js var eprh_enableUseKeyedStateCompilerLint = true; var eprh_enableVerboseNoSetStateInEffectCompilerLint = true; var eprh_enableExhaustiveEffectDependenciesCompilerLint = 'extra-only'; ``` --------- Co-authored-by: lauren <lauren@anysphere.co>
35 lines
978 B
JSON
35 lines
978 B
JSON
{
|
|
"extends": "@tsconfig/strictest/tsconfig.json",
|
|
"compilerOptions": {
|
|
"module": "ES2015",
|
|
"target": "ES2015",
|
|
"moduleResolution": "Bundler",
|
|
"lib": ["ES2020", "dom"],
|
|
"sourceMap": false,
|
|
"types": ["estree-jsx", "node"],
|
|
"downlevelIteration": true,
|
|
"paths": {
|
|
"babel-plugin-react-compiler": ["../../compiler/packages/babel-plugin-react-compiler/src"],
|
|
"shared/*": ["../shared/*"]
|
|
},
|
|
"jsx": "react-jsxdev",
|
|
"rootDir": "../..",
|
|
"baseUrl": ".",
|
|
"typeRoots": [
|
|
"../../node_modules/@types"
|
|
],
|
|
"checkJs": false,
|
|
"allowJs": false,
|
|
|
|
// weaken strictness from preset
|
|
"importsNotUsedAsValues": "remove",
|
|
"noUncheckedIndexedAccess": false,
|
|
"noUnusedParameters": false,
|
|
"useUnknownInCatchVariables": true,
|
|
// ideally turn off only during dev, or on a per-file basis
|
|
"noUnusedLocals": false,
|
|
"removeComments": true,
|
|
},
|
|
"include": ["src/**/*.ts", "__tests__/**/*.ts"]
|
|
}
|