Skip to content

Instantly share code, notes, and snippets.

@raulanatol
Last active March 6, 2019 14:45
Show Gist options
  • Save raulanatol/94d07b4a41745f4b905e1873379b7a72 to your computer and use it in GitHub Desktop.
Save raulanatol/94d07b4a41745f4b905e1873379b7a72 to your computer and use it in GitHub Desktop.
TSLint configuration for React + prettier
{
"extends": [
"tslint:recommended",
"tslint-react",
"tslint-config-prettier"
],
"linterOptions": {
"exclude": [
"config/**/*.js",
"node_modules/**/*.ts",
"coverage/lcov-report/*.js"
]
},
"rules": {
"arrow-parens": false,
"arrow-return-shorthand": [
false
],
"comment-format": [
true,
"check-space"
],
"import-blacklist": [
true,
"rxjs"
],
"interface-over-type-literal": false,
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"constructor",
"static-method",
"instance-method"
]
}
],
"newline-before-return": false,
"no-any": false,
"no-empty-interface": false,
"no-import-side-effect": [
true
],
"no-inferrable-types": [
true,
"ignore-params",
"ignore-properties"
],
"no-invalid-this": [
true,
"check-function-in-method"
],
"no-null-keyword": false,
"no-require-imports": false,
"no-submodule-imports": [
true,
"@src",
"rxjs"
],
"no-this-assignment": [
true,
{
"allow-destructuring": true
}
],
"object-literal-sort-keys": false,
"one-variable-per-declaration": [
false
],
"only-arrow-functions": [
true,
"allow-declarations"
],
"ordered-imports": [
false
],
"prefer-method-signature": false,
"prefer-template": [
true,
"allow-single-concat"
],
"quotemark": [
true,
"single",
"jsx-double"
],
"semicolon": [
true,
"always",
"ignore-bound-class-methods"
],
"trailing-comma": [
true,
{
"singleline": "never"
}
],
"triple-equals": [
true,
"allow-null-check"
],
"type-literal-delimiter": true,
"variable-name": [
true,
"ban-keywords",
"check-format",
"allow-pascal-case",
"allow-leading-underscore"
],
"jsx-no-lambda": false,
"no-console": false,
"array-type": [
true,
"array"
],
"class-name": true,
"indent": [
true,
"spaces"
],
"interface-name": [
true,
"never-prefix"
],
"jsdoc-format": true,
"no-internal-module": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": [
true
],
"no-var-keyword": true,
"object-literal-shorthand": true,
"one-line": [
true,
"check-open-brace",
"check-whitespace"
],
"prefer-const": true,
"space-within-parens": true,
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
},
{
"call-signature": "onespace",
"index-signature": "onespace",
"parameter": "onespace",
"property-declaration": "onespace",
"variable-declaration": "onespace"
}
],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-module",
"check-separator",
"check-type"
],
"no-implicit-dependencies": [
true,
"dev"
],
"object-literal-key-quotes": [
true,
"consistent-as-needed"
],
"ban-types": false,
"forin": false,
"no-conditional-assignment": false,
"no-debugger": false,
"no-empty": false,
"no-eval": false,
"no-invalid-template-strings": false,
"no-object-literal-type-assertion": false,
"no-shadowed-variable": false,
"no-unnecessary-initializer": false,
"no-duplicate-imports": true,
"import-spacing": true,
"no-reference-import": true,
"no-var-requires": false,
"prefer-conditional-expression": false,
"radix": false,
"space-before-function-paren": false,
"align": false,
"eofline": false,
"max-line-length": false,
"no-consecutive-blank-lines": [
true,
2
],
"ban-comma-operator": false,
"max-classes-per-file": false,
"no-angle-bracket-type-assertion": false,
"no-bitwise": false,
"no-namespace": false,
"no-reference": false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment