<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.org/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)
* [`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)
* [`generic-spacing`](#eslint-plugin-flowtype-rules-generic-spacing)
* [`newline-after-flow-annotation`](#eslint-plugin-flowtype-rules-newline-after-flow-annotation)
* [`no-dupe-keys`](#eslint-plugin-flowtype-rules-no-dupe-keys)
* [`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-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-delimiter`](#eslint-plugin-flowtype-rules-object-type-delimiter)
* [`require-exact-type`](#eslint-plugin-flowtype-rules-require-exact-type)
* [`require-parameter-type`](#eslint-plugin-flowtype-rules-require-parameter-type)
* [`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)
* [`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)
* [`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)
* [`valid-syntax`](#eslint-plugin-flowtype-rules-valid-syntax)
<a name="eslint-plugin-flowtype-installation"></a>
## Installation
1. Install [ESLint](https://www.github.com/eslint/eslint).
1. Install [`babel-eslint`](https://github.com/babel/babel-eslint) parser (ESLint parser [does not support type annotations](https://github.com/eslint/eslint/issues/2157)).
1. Install [`eslint-plugin-flowtype`](https://github.com/gajus/eslint-plugin-flowtype) plugin.
<!-- -->
```sh
npm install eslint --save-dev
npm install babel-eslint --save-dev
npm install eslint-plugin-flowtype --save-dev
```
<a name="eslint-plugin-flowtype-configuration"></a>
## Configuration
1. Set `parser` property to `babel-eslint`.
1. Add `plugins` section and specify `eslint-plugin-flowtype` as a plugin.
1. Enable rules.
<!-- -->
```json
{
"parser": "babel-eslint",
"plugins": [
"flowtype"
],
"rules": {
"flowtype/boolean-style": [
2,
"boolean"
],
"flowtype/define-flow-type": 1,
"flowtype/delimiter-dangle": [
2,
"never"
],
"flowtype/generic-spacing": [
2,
"never"
],
"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-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 configurations
The following are third-party submitted/ maintained configurations of `eslint-plugin-flowtype`:
* https://github.com/wemake-services/eslint-config-flowtype-essential
<a name="eslint-plugin-flowtype-settings"></a>
## Settings
<a name="eslint-plugin-flowtype-settings-onlyfileswithflowannotation"></a>
### <code>onlyFilesWithFlowAnnotation</code>
When `true`, only checks files with a [`@flow` annotation](http://flowtype.org/docs/about-flow.html#gradual) in the first comment.
```js
{
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": true
}
}
}
```
<a name="eslint-plugin-flowtype-rules"></a>
## Rules
<!-- Rules are sorted alphabetically. -->
<a name="eslint-plugin-flowtype-rules-array-style-complex-type"></a>
### <code>array-style-complex-type</code>
_The `--fix` option on the command line automatically fixes problems reported by this rule._
Enforces a particular annotation style of complex types.
Type is considered complex in these cases:
* [Maybe type](https://flow.org/en/docs/types/maybe/)
* [Function type](https://flow.org/en/docs/types/functions/)
* [Object type](https://flow.org/en/docs/types/objects/)
* [Tuple type](https://flow.or
没有合适的资源?快使用搜索试试~ 我知道了~
使用reactJs+php全栈 实现的物流管理系统后台.zip
共2000个文件
md:1569个
js:291个
json:87个
0 下载量 56 浏览量
2024-01-18
11:44:55
上传
评论 1
收藏 82.51MB ZIP 举报
温馨提示
软件开发设计:PHP、应用软件开发、系统软件开发、移动应用开发、网站开发C++、Java、python、web、C#等语言的项目开发与学习资料 硬件与设备:单片机、EDA、proteus、RTOS、包括计算机硬件、服务器、网络设备、存储设备、移动设备等 操作系统:LInux、IOS、树莓派、安卓开发、微机操作系统、网络操作系统、分布式操作系统等。此外,还有嵌入式操作系统、智能操作系统等。 网络与通信:数据传输、信号处理、网络协议、网络与通信硬件、网络安全网络与通信是一个非常广泛的领域,它涉及到计算机科学、电子工程、数学等多个学科的知识。 云计算与大数据:数据集、包括云计算平台、大数据分析、人工智能、机器学习等,云计算是一种基于互联网的计算方式,通过这种方式,共享的软硬件资源和信息可以按需提供给计算机和其他设备。
资源推荐
资源详情
资源评论
收起资源包目录
使用reactJs+php全栈 实现的物流管理系统后台.zip (2000个子文件)
bootstrap.min.css 118KB
awesome.css 8KB
metroStyle.css 6KB
zTreeStyle.css 6KB
style.css 4KB
rc-notification.min.css 2KB
rc-notification.css 2KB
index.css 2KB
json.css 1KB
hi.docx 0B
info.html 15KB
search.html 4KB
index.html 4KB
pass.html 2KB
head.html 392B
base.html 155B
jquery-1.9.1.min.js 183KB
rc-notification.js 144KB
index.js 98KB
index.js 71KB
test.js 46KB
rc-notification.min.js 36KB
bootstrap.min.js 36KB
parser.js 29KB
jquery.ztree.core-3.5.min.js 28KB
propTypes.js 23KB
url.js 23KB
index.js 22KB
Components.js 22KB
require-default-props.js 21KB
default-props-match-prop-types.js 20KB
index.cjs.js 19KB
no-unused-prop-types.js 19KB
x509.js 19KB
prop-types.js 18KB
url-parse.js 15KB
punycode.js 14KB
punycode.js 14KB
pkcs8.js 14KB
jsx-curly-spacing.js 13KB
workbox-streams.dev.js 13KB
sort-comp.js 13KB
prefer-stateless-function.js 12KB
DirectoryWatcher.js 12KB
index.js 12KB
certificate.js 11KB
no-unused-state.js 11KB
dhe.js 10KB
jsx-sort-props.js 10KB
container.js 10KB
jsx-closing-bracket-location.js 10KB
index.js 10KB
identity.js 10KB
run_test.js 10KB
dnssec.js 9KB
utils.js 9KB
pkcs1.js 9KB
sort-prop-types.js 9KB
jsx-tag-spacing.js 9KB
openssh-cert.js 9KB
no-unknown-property.js 9KB
test.js 9KB
jsx-indent.js 9KB
boolean-prop-naming.js 8KB
bootstrap-typeahead.js 8KB
index.js 8KB
jsx-curly-brace-presence.js 8KB
json.js 8KB
signature.js 8KB
no-deprecated.js 8KB
key.js 7KB
stringify_test.js 7KB
index.js 7KB
jsx-one-expression-per-line.js 7KB
attribute.js 7KB
expand.js 7KB
Notification.js 7KB
index.js 7KB
index.js 7KB
jsx-wrap-multilines.js 7KB
require-optimization.js 7KB
ssh-private.js 7KB
verify.js 7KB
tokenize.js 7KB
no-typos.js 7KB
index.js 6KB
node-progress.js 6KB
display-name.js 6KB
private-key.js 6KB
setImmediate.js 6KB
processor.js 6KB
entry-index.js 6KB
index.js 6KB
get.js 5KB
Notification.js 5KB
test.js 5KB
jsx-no-bind.js 5KB
no-access-state-in-setstate.js 5KB
forbid-prop-types.js 5KB
read.js 5KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
妄北y
- 粉丝: 1w+
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功