tslint.json 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. {
  2. "rules": {
  3. "array-type": [true, "array-simple"],
  4. "arrow-return-shorthand": true,
  5. "ban": [
  6. true,
  7. { "name": "Array", "message": "tsstyle#array-constructor" }
  8. // { "name": "moment", "message": "Use 'dateTime' instead." }
  9. ],
  10. "ban-types": [
  11. true,
  12. ["Object", "Use {} instead."],
  13. ["String", "Use 'string' instead."],
  14. ["Number", "Use 'number' instead."],
  15. ["Boolean", "Use 'boolean' instead."],
  16. ["Moment", "Use 'DateTime' instead."]
  17. ],
  18. "interface-name": [true, "never-prefix"],
  19. "no-string-throw": true,
  20. "no-unused-expression": true,
  21. "no-unused-variable": false,
  22. "no-use-before-declare": false,
  23. "no-duplicate-variable": true,
  24. "curly": true,
  25. "class-name": true,
  26. "semicolon": [true, "always", "ignore-bound-class-methods"],
  27. "triple-equals": [true, "allow-null-check"],
  28. "comment-format": [false, "check-space"],
  29. "eofline": true,
  30. "forin": false,
  31. "indent": [true, "spaces", 2],
  32. "jsdoc-format": true,
  33. "label-position": true,
  34. "max-line-length": [true, 150],
  35. "member-access": [true, "no-public"],
  36. "new-parens": true,
  37. "no-angle-bracket-type-assertion": true,
  38. "no-arg": true,
  39. "no-bitwise": false,
  40. "no-conditional-assignment": true,
  41. "no-console": [true, "debug", "info", "time", "timeEnd", "trace"],
  42. "no-construct": true,
  43. "no-debugger": true,
  44. "no-empty": false,
  45. "no-eval": true,
  46. "no-inferrable-types": true,
  47. "no-namespace": [true, "allow-declarations"],
  48. "no-reference": true,
  49. "no-shadowed-variable": false,
  50. "no-string-literal": false,
  51. "no-switch-case-fall-through": false,
  52. "no-trailing-whitespace": true,
  53. "no-var-keyword": true,
  54. "object-literal-sort-keys": false,
  55. "one-line": [true, "check-open-brace", "check-catch", "check-else"],
  56. "only-arrow-functions": [true, "allow-declarations", "allow-named-functions"],
  57. "prefer-const": true,
  58. "radix": true,
  59. "typedef-whitespace": [
  60. true,
  61. {
  62. "call-signature": "nospace",
  63. "index-signature": "nospace",
  64. "parameter": "nospace",
  65. "property-declaration": "nospace",
  66. "variable-declaration": "nospace"
  67. }
  68. ],
  69. "variable-name": [
  70. true,
  71. "check-format",
  72. "ban-keywords",
  73. "allow-leading-underscore",
  74. "allow-trailing-underscore",
  75. "allow-pascal-case"
  76. ],
  77. "use-isnan": true,
  78. "whitespace": [true, "check-branch", "check-decl", "check-type", "check-preblock"],
  79. "import-blacklist": [true, "moment"]
  80. }
  81. }