<a name="eslint-plugin-flowtype"></a>
# eslint-plugin-flowtype
[![NPM version](http://img.shields.io/npm/v/eslint-plugin-flowtype.svg?style=flat-square)](https://www.npmjs.org/package/eslint-plugin-flowtype)
[![Travis build status](http://img.shields.io/travis/gajus/eslint-plugin-flowtype/master.svg?style=flat-square)](https://travis-ci.com/github/gajus/eslint-plugin-flowtype)
[![js-canonical-style](https://img.shields.io/badge/code%20style-canonical-blue.svg?style=flat-square)](https://github.com/gajus/canonical)
[Flow type](http://flowtype.org/) linting rules for ESLint.
* [eslint-plugin-flowtype](#eslint-plugin-flowtype)
* [Installation](#eslint-plugin-flowtype-installation)
* [Configuration](#eslint-plugin-flowtype-configuration)
* [Shareable configurations](#eslint-plugin-flowtype-configuration-shareable-configurations)
* [Community maintained configurations](#eslint-plugin-flowtype-configuration-community-maintained-configurations)
* [Settings](#eslint-plugin-flowtype-settings)
* [`onlyFilesWithFlowAnnotation`](#eslint-plugin-flowtype-settings-onlyfileswithflowannotation)
* [Rules](#eslint-plugin-flowtype-rules)
* [`array-style-complex-type`](#eslint-plugin-flowtype-rules-array-style-complex-type)
* [`array-style-simple-type`](#eslint-plugin-flowtype-rules-array-style-simple-type)
* [`arrow-parens`](#eslint-plugin-flowtype-rules-arrow-parens)
* [`boolean-style`](#eslint-plugin-flowtype-rules-boolean-style)
* [`define-flow-type`](#eslint-plugin-flowtype-rules-define-flow-type)
* [`delimiter-dangle`](#eslint-plugin-flowtype-rules-delimiter-dangle)
* [`enforce-line-break`](#eslint-plugin-flowtype-rules-enforce-line-break)
* [`generic-spacing`](#eslint-plugin-flowtype-rules-generic-spacing)
* [`interface-id-match`](#eslint-plugin-flowtype-rules-interface-id-match)
* [`newline-after-flow-annotation`](#eslint-plugin-flowtype-rules-newline-after-flow-annotation)
* [`no-dupe-keys`](#eslint-plugin-flowtype-rules-no-dupe-keys)
* [`no-duplicate-type-union-intersection-members`](#eslint-plugin-flowtype-rules-no-duplicate-type-union-intersection-members)
* [`no-existential-type`](#eslint-plugin-flowtype-rules-no-existential-type)
* [`no-flow-fix-me-comments`](#eslint-plugin-flowtype-rules-no-flow-fix-me-comments)
* [`no-internal-flow-type`](#eslint-plugin-flowtype-rules-no-internal-flow-type)
* [`no-mixed`](#eslint-plugin-flowtype-rules-no-mixed)
* [`no-mutable-array`](#eslint-plugin-flowtype-rules-no-mutable-array)
* [`no-primitive-constructor-types`](#eslint-plugin-flowtype-rules-no-primitive-constructor-types)
* [`no-types-missing-file-annotation`](#eslint-plugin-flowtype-rules-no-types-missing-file-annotation)
* [`no-unused-expressions`](#eslint-plugin-flowtype-rules-no-unused-expressions)
* [`no-weak-types`](#eslint-plugin-flowtype-rules-no-weak-types)
* [`object-type-curly-spacing`](#eslint-plugin-flowtype-rules-object-type-curly-spacing)
* [`object-type-delimiter`](#eslint-plugin-flowtype-rules-object-type-delimiter)
* [`quotes`](#eslint-plugin-flowtype-rules-quotes)
* [`require-compound-type-alias`](#eslint-plugin-flowtype-rules-require-compound-type-alias)
* [`require-exact-type`](#eslint-plugin-flowtype-rules-require-exact-type)
* [`require-indexer-name`](#eslint-plugin-flowtype-rules-require-indexer-name)
* [`require-inexact-type`](#eslint-plugin-flowtype-rules-require-inexact-type)
* [`require-parameter-type`](#eslint-plugin-flowtype-rules-require-parameter-type)
* [`require-readonly-react-props`](#eslint-plugin-flowtype-rules-require-readonly-react-props)
* [`require-return-type`](#eslint-plugin-flowtype-rules-require-return-type)
* [`require-types-at-top`](#eslint-plugin-flowtype-rules-require-types-at-top)
* [`require-valid-file-annotation`](#eslint-plugin-flowtype-rules-require-valid-file-annotation)
* [`require-variable-type`](#eslint-plugin-flowtype-rules-require-variable-type)
* [`semi`](#eslint-plugin-flowtype-rules-semi)
* [`sort-keys`](#eslint-plugin-flowtype-rules-sort-keys)
* [`sort-type-union-intersection-members`](#eslint-plugin-flowtype-rules-sort-type-union-intersection-members)
* [`space-after-type-colon`](#eslint-plugin-flowtype-rules-space-after-type-colon)
* [`space-before-generic-bracket`](#eslint-plugin-flowtype-rules-space-before-generic-bracket)
* [`space-before-type-colon`](#eslint-plugin-flowtype-rules-space-before-type-colon)
* [`spread-exact-type`](#eslint-plugin-flowtype-rules-spread-exact-type)
* [`type-id-match`](#eslint-plugin-flowtype-rules-type-id-match)
* [`type-import-style`](#eslint-plugin-flowtype-rules-type-import-style)
* [`union-intersection-spacing`](#eslint-plugin-flowtype-rules-union-intersection-spacing)
* [`use-flow-type`](#eslint-plugin-flowtype-rules-use-flow-type)
* [`use-read-only-spread`](#eslint-plugin-flowtype-rules-use-read-only-spread)
* [`valid-syntax`](#eslint-plugin-flowtype-rules-valid-syntax)
<a name="eslint-plugin-flowtype-installation"></a>
## Installation
```bash
npm install eslint --save-dev
npm install @babel/eslint-parser --save-dev
npm install eslint-plugin-flowtype --save-dev
```
<a name="eslint-plugin-flowtype-configuration"></a>
## Configuration
1. Set `parser` property to `@babel/eslint-parser`.
1. Add `plugins` section and specify `eslint-plugin-flowtype` as a plugin.
1. Enable rules.
<!-- -->
```json
{
"parser": "@babel/eslint-parser",
"plugins": [
"flowtype"
],
"rules": {
"flowtype/boolean-style": [
2,
"boolean"
],
"flowtype/define-flow-type": 1,
"flowtype/delimiter-dangle": [
2,
"never"
],
"flowtype/generic-spacing": [
2,
"never"
],
"flowtype/interface-id-match": [
2,
"^([A-Z][a-z0-9]+)+Type$"
],
"flowtype/no-mixed": 2,
"flowtype/no-primitive-constructor-types": 2,
"flowtype/no-types-missing-file-annotation": 2,
"flowtype/no-weak-types": 2,
"flowtype/object-type-delimiter": [
2,
"comma"
],
"flowtype/require-parameter-type": 2,
"flowtype/require-readonly-react-props": 0,
"flowtype/require-return-type": [
2,
"always",
{
"annotateUndefined": "never"
}
],
"flowtype/require-valid-file-annotation": 2,
"flowtype/semi": [
2,
"always"
],
"flowtype/space-after-type-colon": [
2,
"always"
],
"flowtype/space-before-generic-bracket": [
2,
"never"
],
"flowtype/space-before-type-colon": [
2,
"never"
],
"flowtype/type-id-match": [
2,
"^([A-Z][a-z0-9]+)+Type$"
],
"flowtype/union-intersection-spacing": [
2,
"always"
],
"flowtype/use-flow-type": 1,
"flowtype/valid-syntax": 1
},
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": false
}
}
}
```
<a name="eslint-plugin-flowtype-configuration-shareable-configurations"></a>
### Shareable configurations
<a name="eslint-plugin-flowtype-configuration-shareable-configurations-recommended"></a>
#### Recommended
This plugin exports a [recommended configuration](./src/configs/recommended.json) that enforces Flow type good practices.
To enable this configuration use the extends property in your `.eslintrc` config file:
```json
{
"extends": [
"plugin:flowtype/recommended"
],
"plugins": [
"flowtype"
]
}
```
See [ESLint documentation](http://eslint.org/docs/user-guide/configuring#extending-configuration-files) for more information about extending configuration files.
<a name="eslint-plugin-flowtype-configuration-community-maintained-configurations"></a>
### Community maintained conf
没有合适的资源?快使用搜索试试~ 我知道了~
模拟移动端美团案例(react-redux版)
共2003个文件
md:1540个
js:391个
json:61个
0 下载量 77 浏览量
2024-04-11
20:20:33
上传
评论
收藏 87.75MB ZIP 举报
温馨提示
完整模拟美团菜单案例项目react版(需要者可自取)
资源推荐
资源详情
资源评论
收起资源包目录
模拟移动端美团案例(react-redux版) (2003个子文件)
sanitize.css 7KB
typography.css 1KB
forms.css 1010B
ui-monospace.css 992B
system-ui.css 868B
reduce-motion.css 708B
assets.css 168B
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
dom.umd.js 470KB
react.umd.js 377KB
react.pure.umd.js 364KB
dom.umd.min.js 215KB
react.umd.min.js 169KB
react.pure.umd.min.js 169KB
dom.cjs.js 93KB
dom.esm.js 91KB
index.js 71KB
fake-timers-src.js 55KB
propTypes.js 44KB
Components.js 29KB
react-refresh-babel.development.js 26KB
no-unknown-property.js 26KB
index.js 25KB
react-refresh-runtime.development.js 22KB
DirectoryWatcher.js 20KB
usedPropTypes.js 18KB
jsx-sort-props.js 18KB
conversions.js 17KB
conversions.js 17KB
conversions.js 17KB
no-invalid-html-attribute.js 16KB
no-unused-state.js 15KB
no-unstable-nested-components.js 15KB
jsx-curly-spacing.js 14KB
jsx-indent.js 14KB
react.cjs.js 14KB
jsx-curly-brace-presence.js 14KB
sort-comp.js 13KB
react.esm.js 13KB
react.pure.cjs.js 13KB
prefer-stateless-function.js 12KB
async.js 12KB
boolean-prop-naming.js 12KB
event-map.js 12KB
runTest.js 12KB
ast.js 12KB
react.pure.esm.js 11KB
index.js 11KB
jsx-no-target-blank.js 11KB
workbox-streams.dev.js 11KB
jsx-closing-bracket-location.js 11KB
destructuring-assignment.js 10KB
jsx-tag-spacing.js 10KB
watchpack.js 10KB
jsx-key.js 10KB
role-helpers.js 9KB
index.js 9KB
role.js 9KB
pure.js 9KB
no-typos.js 9KB
watchEventSource.js 8KB
forbid-prop-types.js 8KB
defaultProps.js 8KB
no-deprecated.js 8KB
function-component-definition.js 8KB
react-refresh-babel.production.min.js 8KB
display-name.js 8KB
sort-prop-types.js 8KB
index.js 8KB
jsx-wrap-multilines.js 8KB
sync.js 8KB
jsx-one-expression-per-line.js 7KB
jsx-no-constructed-context-values.js 7KB
no-array-index-key.js 7KB
hook-use-state.js 7KB
require-optimization.js 7KB
jsx-fragments.js 7KB
jsx-no-useless-fragment.js 7KB
index.js 7KB
wait-for.js 7KB
no-unused-class-component-methods.js 7KB
require-default-props.js 6KB
static-property-placement.js 6KB
ensureCompatibility.js 6KB
jsx-indent-props.js 6KB
label-text.js 6KB
jsx-no-leaked-render.js 6KB
propTypesSort.js 6KB
query-helpers.js 6KB
utils.js 6KB
prop-types.js 6KB
index.js 6KB
index.js 6KB
index.js 6KB
character.js 6KB
jsx-no-bind.js 6KB
jsx-curly-newline.js 6KB
keyboardImplementation.js 6KB
共 2003 条
- 1
- 2
- 3
- 4
- 5
- 6
- 21
资源评论
野区小女王
- 粉丝: 135
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- TbReactions(BaseModel)
- request-validator.cpython-37
- pygments.lexers.javascript ~~~~~~~~~~~~~~~~~~~~~~~~~~
- 简单小游戏制作-飞行棋
- Python数学建模例子.rar
- Java项目-基于SSM+JSP的校园外卖配送系统的设计与实现(源码+万字LW+部署视频+代码讲解视频+全套软件)
- Color-Transformer introduction
- FastStone Capture屏幕长截图软件包
- Table IoT物联网工具,简单快速的搭建物联网服务平台
- zheng2020 ecg new dataset-12 lead-add-label
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功