nunof07/smalltypes

View on GitHub
tslint.json

Summary

Maintainability
Test Coverage
{
    "extends": [
        "tslint-microsoft-contrib",
        "tslint-eslint-rules",
        "tslint-immutable",
        "tslint-no-subclass"
    ],
    "rules": {
        "indent": [true, "spaces", 4],
        "linebreak-style": [true, "LF"],
        "interface-name": [true, "never-prefix"],
        "strict-boolean-expressions": [true, "allow-undefined-union"],
        "no-unused-variable": true,
        "function-name": [
            true,
            {

                "method-regex": "^([a-z][\\w\\d]+)|(\\[Symbol\\.[a-z][\\w\\d]+\\])$", // original: "^[a-z][\\w\\d]+$"

                // unchanged
                "private-method-regex": "^[a-z][\\w\\d]+$",
                "protected-method-regex": "^[a-z][\\w\\d]+$",
                "static-method-regex": "^[A-Z_\\d]+$",
                "function-regex": "^[a-z][\\w\\d]+$"
            }
        ],
        "no-backbone-get-set-outside-model": false,
        "unified-signatures": false,
        "ordered-imports": [true, { "grouped-imports": true }],
        "space-within-parens": [true, 0],
        "arrow-parens": true,
        "cyclomatic-complexity": [true, 5],
        "max-file-line-count": [true, 300],
        "no-parameter-reassignment": true,

        // tslint-eslint-rules
        "no-empty-character-class": true,
        "no-ex-assign": true,
        "no-extra-boolean-cast": true,
        "no-inner-declarations": [true, "both"],
        "no-unexpected-multiline": true,
        "valid-jsdoc": [false],
        "no-multi-spaces": [
            true,
            {
              "exceptions": { "PropertyAssignment": false }
            }
        ],
        "handle-callback-err": [true, "^(err|error)$"],
        "array-bracket-spacing": [true, "never"],
        "block-spacing": [true, "always"],
        "brace-style": [true, "1tbs"],
        // "ter-computed-property-spacing": [true, "never"],
        "ter-func-call-spacing": [true, "never"],
        "object-curly-spacing": [true, "always"],
        // "sort-imports": [true, { "ignore-case": true }],
        // "ter-no-tabs": true,
        "ter-prefer-arrow-callback": [true],
        "ter-arrow-spacing": [true],

        // tslint-immutable
        "readonly-keyword": true,
        "no-let": [true, "ignore-local"],
        "no-object-mutation": [true, { "ignore-prefix": ["this."] }],
        "no-delete": true,
        "no-mixed-interface": true,

        // tslint-no-subclass
        "no-subclass": [true, "Error"]
    }
}