美文网首页
ts规范(tslint.json)

ts规范(tslint.json)

作者: jevons_lee_ | 来源:发表于2019-04-02 00:27 被阅读0次

    分享学到的 TS 规范,以后就按这个要求自己
    记得装 tslint-config-airbnb-base , tslint-react (--dev)

    // tslint.json
    {
        "extends": ["tslint-config-airbnb-base", "tslint-react"],
        "rules": {
            "ter-indent": [
                true,
                4,
                {
                    "SwitchCase": 1,
                    "FunctionExpression": {
                        "parameters": 1,
                        "body": 1
                    }
                }
            ],
            "no-unnecessary-else": false,
            "ter-max-len": false,
            "no-empty": false,
            "no-magic-numbers": false,
            "jsx-wrap-multiline": false,
            "jsx-no-multiline-js": false,
            "jsx-no-lambda": false,
            "jsx-alignment": false,
            "jsx-no-string-ref": false,
            "variable-name": false,
            "ter-arrow-body-style": false,
            "object-literal-sort-keys": false,
            "no-console": [true, "warn", "error"],
            "comment-format": [false, "check-space"],
            "no-namespace": false,
            "interface-name": false,
            "no-shadowed-variable": false,
            "one-variable-per-declaration": false,
            "no-unused-expression": [true, "allow-fast-null-checks"],
            "radix": false,
            "only-arrow-functions": false,
            "member-ordering": false,
            "trailing-comma": false,
            "ordered-imports": false,
            "no-bitwise": false,
            "no-var-requires": false,
            "quotemark": [
                true,
                "double",
                "avoid-escape"
            ]
        }
    }
    

    相关文章

      网友评论

          本文标题:ts规范(tslint.json)

          本文链接:https://www.haomeiwen.com/subject/cbmibqtx.html