2
0

.eslintrc-base.json 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. {
  2. "rules": {
  3. // Possible errors
  4. "comma-dangle" : [2, "always-multiline"],
  5. "no-cond-assign" : [2, "except-parens"],
  6. "no-constant-condition" : [2, {"checkLoops" : false}],
  7. "no-control-regex" : 2,
  8. "no-debugger" : 2,
  9. "no-dupe-args" : 2,
  10. "no-dupe-keys" : 2,
  11. "no-duplicate-case" : 2,
  12. "no-empty-character-class" : 2,
  13. "no-empty" : 2,
  14. "no-ex-assign" : 2,
  15. "no-extra-boolean-cast" : 2,
  16. "no-extra-semi" : 2,
  17. "no-func-assign" : 2,
  18. "no-inner-declarations" : 2,
  19. "no-invalid-regexp" : 2,
  20. "no-irregular-whitespace" : 2,
  21. "no-negated-in-lhs" : 2,
  22. "no-obj-calls" : 2,
  23. "no-regex-spaces" : 2,
  24. "no-sparse-arrays" : 2,
  25. "no-unreachable" : 2,
  26. "use-isnan" : 2,
  27. "no-unsafe-finally" : 2,
  28. "valid-typeof" : 2,
  29. "no-unexpected-multiline" : 2,
  30. // Best practices
  31. "accessor-pairs" : 2,
  32. "array-callback-return" : 2,
  33. "eqeqeq" : [2, "allow-null"],
  34. "no-alert" : 2,
  35. "no-caller" : 2,
  36. "no-case-declarations" : 2,
  37. "no-eval" : 2,
  38. "no-extend-native" : 2,
  39. "no-extra-bind" : 2,
  40. "no-extra-label" : 2,
  41. "no-fallthrough" : [2, { "commentPattern": "(fall[\\s\\w]*through|break[\\s\\w]*omitted)" }],
  42. "no-floating-decimal" : 2,
  43. "no-implied-eval" : 2,
  44. "no-invalid-this" : 0,
  45. "no-iterator" : 2,
  46. "no-multi-str" : 2,
  47. "no-new-func" : 2,
  48. "no-new-wrappers" : 2,
  49. "no-new" : 2,
  50. "no-octal-escape" : 2,
  51. "no-octal" : 2,
  52. "no-proto" : 2,
  53. "no-redeclare" : 2,
  54. "no-return-assign" : 2,
  55. "no-script-url" : 2,
  56. "no-self-assign" : 2,
  57. "no-self-compare" : 2,
  58. "no-sequences" : 2,
  59. "no-throw-literal" : 2,
  60. "no-unmodified-loop-condition" : 2,
  61. "no-unused-expressions" : 2,
  62. "no-unused-labels" : 2,
  63. "no-useless-call" : 2,
  64. "no-useless-concat" : 2,
  65. "no-useless-escape" : 2,
  66. "no-void" : 2,
  67. "no-with" : 2,
  68. "wrap-iife" : [2, "inside"],
  69. "yoda" : [2, "never"],
  70. // Strict mode
  71. "strict" : [2, "global"],
  72. // Variables
  73. "no-delete-var" : 2,
  74. "no-label-var" : 2,
  75. "no-restricted-globals" : ["error", "event"],
  76. "no-shadow-restricted-names" : 2,
  77. "no-undef" : 2,
  78. "no-undef-init" : 2,
  79. "no-undefined" : 2,
  80. "no-unused-vars" : [2, { "vars" : "all", "args" : "after-used" }],
  81. // Node.js
  82. "handle-callback-err": "error",
  83. // Stylistic issues
  84. "array-bracket-spacing" : [2, "never"],
  85. "brace-style" : [2, "1tbs", { "allowSingleLine" : true }],
  86. "comma-spacing" : [2, { "before" : false, "after" : true }],
  87. "comma-style" : [2, "last"],
  88. "eol-last" : 1,
  89. "keyword-spacing": [ 2,
  90. {
  91. "after" : true,
  92. "overrides": {
  93. "if" : { "after" : true },
  94. "else" : { "after" : true },
  95. "for" : { "after" : true },
  96. "while" : { "after" : true },
  97. "do" : { "after" : true },
  98. "switch" : { "after" : true },
  99. "case" : { "after" : true },
  100. "return" : { "after" : true },
  101. "try" : { "after" : true },
  102. "catch" : { "after" : true },
  103. "typeof" : { "after" : true }
  104. }
  105. }
  106. ],
  107. //"linebreak-style" : [2, "unix"],
  108. "max-len" : [2, { "code": 100, "tabWidth": 2, "ignoreComments": false, "ignoreUrls": true, "ignoreStrings": true, "ignoreTemplateLiterals": true, "ignoreRegExpLiterals": true }],
  109. "new-cap" : 2,
  110. "new-parens" : 2,
  111. "no-array-constructor" : 2,
  112. "no-mixed-spaces-and-tabs" : 2,
  113. "no-multiple-empty-lines" : [2, { "max": 2, "maxBOF": 1, "maxEOF": 1}],
  114. "no-whitespace-before-property" : 2,
  115. "func-call-spacing" : [2, "never"],
  116. "no-trailing-spaces" : 2,
  117. "no-unneeded-ternary" : 2,
  118. "operator-assignment" : 2,
  119. "operator-linebreak" : [2, "before"],
  120. "quotes" : [2, "single", "avoid-escape"],
  121. "semi-spacing" : [2, { "before": false, "after": true }],
  122. "semi" : [2, "always"],
  123. "space-before-blocks" : [2, "always"],
  124. "space-before-function-paren" : [2, "always"],
  125. "space-in-parens" : [2, "never"],
  126. "space-infix-ops" : 2,
  127. "space-unary-ops" : [2, { "words" : true, "nonwords" : false }],
  128. "spaced-comment" : [2, "always", { "exceptions" : ["-", "+", "/"], "markers" : ["//"] }],
  129. "unicode-bom" : [2, "never"]
  130. }
  131. }