Skip to content

Instantly share code, notes, and snippets.

@abierbaum
Created May 14, 2016 18:49
Show Gist options
  • Save abierbaum/664db71cdc32985a2e56275fc7e280c9 to your computer and use it in GitHub Desktop.
Save abierbaum/664db71cdc32985a2e56275fc7e280c9 to your computer and use it in GitHub Desktop.
tslint.json file for bug report
{
"rulesDirectory": [
"node_modules/tslint-eslint-rules/dist/rules",
"node_modules/tslint-microsoft-contrib",
"node_modules/vrsource-tslint-rules/rules"
],
"rules": {
"align": [
true,
"parameters",
"arguments",
"statements"
],
"class-name": true,
"comment-format": [
true
],
"curly": true,
"eofline": true,
"forin": true,
"indent": [
true,
"spaces"
],
"interface-name": [ true, "always-prefix"],
"jsdoc-format": true,
"label-position": true,
"label-undefined": true,
"max-line-length": [ true, 100],
"member-ordering": [
true,
"public-before-private",
"static-before-instance",
"variables-before-functions"
],
"no-angle-bracket-type-assertion": true,
"no-arg": true,
"no-bitwise": true,
"no-conditional-assignment": true,
"no-construct": true,
"no-constructor-vars": true,
"no-debugger": true,
"no-duplicate-key": true,
"no-duplicate-variable": true,
"no-empty": true,
"no-eval": true,
//"no-inferrable-types": true
"no-internal-module": true,
"no-invalid-this": true,
"no-shadowed-variable": true,
"no-string-literal": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unreachable": true,
"no-unused-expression": true,
"no-unused-variable": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"no-var-requires": false,
"object-literal-sort-keys": false,
"one-line": [
true,
"check-open-brace",
"check-whitespace"
],
"quotemark": [
true,
"single",
"avoid-escape"
],
"radix": true,
"semicolon": [ true, "always" ],
"switch-default": true,
"trailing-comma": [
true,
{
"multiline": "always",
"singleline": "never"
}
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef": [
true,
"call-signature",
"parameter",
//"arrow-parameter",
//"property-declaration",
//"variable-declaration"
"member-variable-declaration"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
/*
"variable-name": [
true,
"ban-keywords"
],
*/
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
// --- tslint-eslint rules --- //
"brace-style": [
true,
"stroustrup",
{
"allowSingleLine": true
}
],
"no-constant-condition": true,
"no-duplicate-case": true,
"no-empty-character-class": true,
"no-ex-assign": false,
"no-extra-boolean-cast": true,
"no-extra-semi": true,
"no-invalid-regexp": true,
"no-irregular-whitespace": true,
"no-regex-spaces": true,
"no-reference": true,
"no-sparse-arrays": true,
"no-unexpected-multiline": true,
"use-isnan": true,
"valid-jsdoc": [
false
],
"valid-typeof": true,
// --- tslint-microsoft-contrib rules --- //
"no-multiple-var-decl": true,
"no-duplicate-parameter-names": true,
"no-reserved-keywords": true, // not working
"no-banned-terms": true, // not working
// --- vrsource-tslint-rules --- //
//"conditional-expression-parens": true,
"dot-notation": [
true,
{ "allow-pattern": "^[a-z]+(_[a-z]+)+$" }
],
// naming convention
"ext-variable-name": [
true,
["class", "pascal"],
["interface", "pascal", {"regex": "^I.*$"}],
["parameter", "camel"],
//["property", "const", "static", "upper"],
//["property", "static", "camel", {"regex": "^s.*$"}],
["property", "static", "upper"],
["property", "private", "camel", "allow-leading-underscore"],
["property", "protected", "camel", "allow-leading-underscore"],
["property", "public", "camel"],
["variable", "local", "snake"],
["variable", "const", "upper"],
["variable", "camel", {"regex": "^g.*$"}],
["method", "private", "camel", "allow-leading-underscore"],
["method", "protected", "camel", "allow-leading-underscore"],
["method", "protected", "camel"],
["function", "camel"],
["default", "camel"]
],
"max-params": [
true,
7
],
"multiline-arrow": [
true,
"require-parens",
"require-block"
],
"no-duplicate-imports": true,
"no-param-reassign": true,
"literal-spacing": [
true,
{
"array": ["never"],
"object": ["never"]
}
],
"prefer-case-blocks": true,
"prefer-const": true,
"prefer-literal": [
true,
"object",
"function",
"array"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment