【发布时间】:2016-07-15 11:16:41
【问题描述】:
我在一个项目中使用 ESLint,也想使用 Facebook 流,但是我收到了来自 ESLint 的关于流类型注释的警告。
我在项目根目录中有 .flowconfig 和 .eslintrc。
.eslintrc:
// When you write javascript you should follow these soft rules and best practices
// https://github.com/airbnb/javascript
// This is a link to best practices and enforcer settings for eslint
// https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb
// Use this file as a starting point for your project's .eslintrc.
{
"extends": "airbnb",
"plugins": [
"flow-vars"
],
"rules": {
"flow-vars/define-flow-type": 1,
"flow-vars/use-flow-type": 1
}
}
我应该怎么做才能让它工作?有没有办法使用 webpack 一起在 watch 任务中运行流?
【问题讨论】:
标签: javascript facebook reactjs eslint flowtype