ts规范(tslint.json)

分享学到的 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))