gpt4 book ai didi

javascript - 具有标准的 Flowtype 无法加载插件 flowtype--parser

转载 作者:行者123 更新时间:2023-11-28 04:10:23 24 4
gpt4 key购买 nike

enter image description here

安装在package.json

"babel-preset-flow": "^6.23.0",
"eslint-plugin-flowtype": "2.35.1",
"flow-bin": "^0.55.0",
"flow-typed": "2.1.5",
"standard-flow": "^1.0.0",
"babel-eslint": "8.0.0",
"eslint": "^4.7.1",
"eslint-plugin-flowtype": "2.35.1",

Error: Failed to load plugin flowtype--parser: Cannot find module 'eslint-plugin-flowtype--parser'

Error: Failed to load plugin flowtype--parser: Cannot find module 'eslint-plugin-flowtype--parser' at Function.Module._resolveFilename (module.js:489:15) at Function.resolve (internal/module.js:18:19)

我的标准配置..

 "standard": {
"ignore": [
"/flow-type/**/*"
],
"env": [
"mocha"
],
"globals": [
"fetch"
],
"parser": "babel-eslint",
"extends": [
"plugin:flowtype/recommended"
],
"plugins": [
"flowtype"
]
},

即使我在控制台中运行...

npx standard --fix | snazzy && npx flow
....
.../flow-typed/npm/sinon_vx.x.x.js
203:27 error '$Exports' is not defined
206:27 error '$Exports' is not defined
209:27 error '$Exports' is not defined
... // MORE ..

最佳答案

Cannot find module 'eslint-plugin-flowtype--parser'

两个破折号肯定是拼写错误。无论如何,应该使用 babel-eslint 作为解析器,并使用 eslint-plugin-flowtype 作为插件之一。

是的,所有这些 eslint/babel/flowtype 插件和配置可能会令人困惑。您可以浏览他们所有的自述文件...

或者你可以看看最终配置here ,例如。

关于javascript - 具有标准的 Flowtype 无法加载插件 flowtype--parser,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46345516/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com