fis3-lint-flow

1.0.3 • Public • Published

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插件

Package Sidebar

Install

npm i fis3-lint-flow

Weekly Downloads

4

Version

1.0.3

License

ISC

Last publish

Collaborators

  • peter_bj