fis3-lint-flow
flow linter fis3 plugin
Last updated 2 years ago by peter_bj .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install fis3-lint-flow 
SYNC missed versions from official npm registry.

fis3-lint-flow

flow linter fis3 plugin

fis3 release -l(开启lint功能)

CHANGELOG

  • 2017-08-04 lint信息提示改为中文提示

###fis-conf.js 插件参数请参照 eslint

fis.match("/src/**.js",{
	lint: fis.plugin("flow", {
    	cwd: String, // 可选, 当前项目根路径
		plugins: String||Array[String], // 可选, 除了babel-plugin-flowtype以外的其他插件
		rules: Object, // 可选, 除了默认项以外的其他规则
		settings:  Object, // 可选
		globals: Object, //可选
	}),
	release: "$0"
});

//其他的参数选型暂不支持

###默认lint参数如下:

    {
        "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
            }
        }
    }

###其他fis插件

Current Tags

  • 1.0.3                                ...           latest (2 years ago)

4 Versions

  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |