Last active
August 31, 2017 18:36
-
-
Save isaaclyman/43dfca81a2251333a1a49d31490e0071 to your computer and use it in GitHub Desktop.
My preferred TypeScript/TSLint settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"allowSyntheticDefaultImports": true, | |
"alwaysStrict": true, | |
"lib": ["es6", "dom"], | |
"module": "es2015", | |
"moduleResolution": "node", | |
"noImplicitAny": true, | |
"noImplicitReturns": true, | |
"sourceMap": true, | |
"strict": true, | |
"target": "es5", | |
"baseUrl": "./src", | |
"paths": { | |
"@/*": ["src/*"] | |
} | |
}, | |
"include": [ | |
"./src/**/*" | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"rules": { | |
"arrow-parens": true, | |
"ban": [true, | |
{ | |
"name": "parseInt", | |
"message": "Use the \"Number()\" constructor instead. If a Number type is not necessary, use \"*.toString()\"." | |
}, | |
{ | |
"name": [ | |
"*", | |
"success" | |
], | |
"message": "The \"Promise.success()\" method is dead. Use \"Promise.then()\"." | |
}, | |
{ | |
"name": [ | |
"*", | |
"error" | |
], | |
"message": "The \"Promise.error()\" method is dead. Use \"Promise.catch()\"." | |
} | |
], | |
"curly": true, | |
"cyclomatic-complexity": [ | |
true, | |
25 | |
], | |
"indent": [ | |
true, | |
"spaces", | |
2 | |
], | |
"member-access": [ | |
true, | |
"check-accessor", | |
"check-constructor" | |
], | |
"no-conditional-assignment": true, | |
"no-empty": true, | |
"no-invalid-template-strings": true, | |
"no-irregular-whitespace": true, | |
"no-magic-numbers": true, | |
"no-misused-new": true, | |
"no-reference": true, | |
"no-string-literal": true, | |
"no-trailing-whitespace": true, | |
"no-unused-expression": [ | |
true, | |
"allow-new" | |
], | |
"no-unused-variable": [ | |
true, | |
{ | |
"ignore-pattern": "^_" | |
} | |
], | |
"no-var-keyword": true, | |
"number-literal-format": true, | |
"object-literal-sort-keys": true, | |
"prefer-const": true, | |
"prefer-for-of": true, | |
"quotemark": [ | |
true, | |
"single" | |
], | |
"semicolon": [ | |
true, | |
"never" | |
], | |
"strict-type-predicates": true, | |
"triple-equals": true, | |
"typeof-compare": true, | |
"use-isnan": true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment