-
-
Notifications
You must be signed in to change notification settings - Fork 153
Open
Description
got this error when i try to build a create-react-app project
env: node v18.18.0 webpack5
error message:
Failed to compile.
[eslint] BaseConfig » plugin:flowtype/recommended:
Configuration for rule "flowtype/boolean-style" is invalid:
Value ["boolean"] should NOT have more than 0 items.
my webpack config code:
plugins: [
// Generates an `index.html` file with the <script> injected.
new ESLintPlugin({
extensions: ['js', 'mjs', 'jsx', 'ts', 'tsx'],
formatter: require.resolve('react-dev-utils/eslintFormatter'),
eslintPath: require.resolve('eslint'),
context: paths.appSrc,
cache: true,
cwd: paths.appPath,
resolvePluginsRelativeTo: __dirname,
baseConfig: {
extends: [
require.resolve('eslint-config-react-app/base'),
'plugin:flowtype/recommended'
],
plugins: ['flowtype'],
rules: {
"flowtype/define-flow-type": 1,
'flowtype/boolean-style': [
2,
"boolean"
],
},
parser: '@babel/eslint-parser',
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: ['@babel/preset-react', '@babel/preset-flow'],
},
},
settings: {
flowtype: {
onlyFilesWithFlowAnnotation: true,
},
},
},
})
].filter(Boolean),
Metadata
Metadata
Assignees
Labels
No labels