Advertisement
Guest User

Untitled

a guest
Jul 25th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.47 KB | None | 0 0
  1. module.exports = {
  2. "env": {
  3. "browser": true,
  4. "commonjs": true,
  5. "es6": true,
  6. "node": true
  7. },
  8. "extends": "eslint:recommended",
  9. "parserOptions": {
  10. "sourceType": "module"
  11. },
  12. "rules": {
  13. "indent": ["warn", 2],
  14. "linebreak-style": ["error", "unix"],
  15. "quotes": ["warn", "single"],
  16. "semi": ["error", "always"],
  17. "no-console" : ["off"],
  18. "camelcase" : ["off"],
  19.  
  20. // Rule Best Practices
  21. "accessor-pairs": ["error"],
  22. "array-callback-return": ["error"],
  23. "block-scoped-var": ["error"],
  24. "complexity": ["warn", 5],
  25. "consistent-return": ["error"],
  26. "curly": ["error"],
  27. "default-case": ["warn"],
  28. "dot-location": ["off"],
  29. "dot-notation": ["warn"],
  30. "eqeqeq": ["error"],
  31. "guard-for-in": ["error"],
  32. "no-alert": ["off"],
  33. "no-caller": ["error"],
  34. // "no-case-declarations": ["error"],
  35. "no-div-regex": ["error"],
  36. "no-else-return": ["warn"],
  37. "no-empty-function": ["error"],
  38. // "no-empty-pattern": ["error"],
  39. "no-eq-null": ["error"],
  40. "no-eval": ["error"],
  41. "no-extend-native": ["warn"],
  42. "no-extra-bind": ["error"],
  43. "no-extra-label": ["error"],
  44. // "no-fallthrough": ["error"],
  45. "no-floating-decimal": ["error"],
  46. "no-implicit-coercion": ["warn"],
  47. "no-implicit-globals": ["error"],
  48. "no-implied-eval": ["warn"],
  49. "no-invalid-this": ["error"],
  50. "no-iterator": ["error"],
  51. "no-labels": ["error"],
  52. "no-lone-blocks": ["error"],
  53. "no-loop-func": ["error"],
  54. "no-magic-numbers": ["off"],
  55. "no-multi-spaces": ["off"],
  56. "no-multi-str": ["error"],
  57. // "no-native-reassign": ["error"],
  58. "no-new-func": ["error"],
  59. "no-new-wrappers": ["error"],
  60. "no-new": ["error"],
  61. "no-octal-escape": ["error"],
  62. // "no-octal": ["error"],
  63. "no-param-reassign": ["warn"],
  64. "no-proto": ["error"],
  65. // "no-redeclare": ["error"],
  66. "no-return-assign": ["error"],
  67. "no-script-url": ["error"],
  68. // "no-self-assign": ["error"],
  69. "no-self-compare": ["error"],
  70. "no-sequences": ["error"],
  71. "no-throw-literal": ["error"],
  72. "no-unmodified-loop-condition": ["error"],
  73. "no-unused-expressions": ["error"],
  74. // "no-unused-labels": ["error"],
  75. "no-useless-call": ["error"],
  76. "no-useless-concat": ["error"],
  77. "no-useless-escape": ["error"],
  78. "no-void": ["error"],
  79. "no-warning-comments": ["warn"],
  80. "no-with": ["error"],
  81. "radix": ["error"],
  82. "vars-on-top": ["off"],
  83. "wrap-iife": ["error"],
  84. "yoda": ["error"],
  85.  
  86. // Rule Variables
  87. "init-declarations": ["off"],
  88. "no-catch-shadow": ["error"],
  89. // "no-delete-var" : ["error"],
  90. "no-label-var": ["error"],
  91. "no-restricted-globals": ["error"],
  92. "no-shadow-restricted-names": ["error"],
  93. "no-shadow": ["warn"],
  94. "no-undef-init": ["warn"],
  95. // "no-undef" : ["error"],
  96. "no-undefined": ["error"],
  97. "no-unused-vars" : ["warn"],
  98. "no-use-before-define": ["off"],
  99.  
  100. // Rule Node.js and CommonJS
  101. "callback-return": ["error"],
  102. "global-require": ["error"],
  103. "handle-callback-err": ["error"],
  104. "no-mixed-requires": ["error"],
  105. "no-new-require": ["error"],
  106. "no-path-concat": ["error"],
  107. "no-process-env": ["off"],
  108. "no-process-exit": ["warn"],
  109. "no-restricted-modules": ["error"],
  110. "no-sync": ["warn"],
  111.  
  112. // Rule Stylistic Issues
  113. "array-bracket-spacing": ["warn"],
  114. "block-spacing": ["warn"],
  115. "brace-style": ["off"],
  116. "camelcase": ["warn", { "properties": "always" }],
  117. "comma-dangle": ["error"],
  118. "comma-spacing": ["warn"],
  119. "comma-style": ["off"],
  120. "computed-property-spacing": ["off"],
  121. "consistent-this": ["warn", "self"],
  122. "eol-last": ["off"],
  123. "func-names": ["off"],
  124. "func-style": ["off"],
  125. "id-blacklist": ["error"],
  126. "id-length": ["warn", { "min": 1, "max": 18, "properties": "never", "exceptions": ["x"] }],
  127. "id-match": ["off"],
  128. "indent": ["warn", 2],
  129. "jsx-quotes": ["off"],
  130. "key-spacing": ["off"],
  131. "keyword-spacing": ["warn"],
  132. "linebreak-style": ["error", "unix"],
  133. "lines-around-comment": ["warn"],
  134.  
  135. "no-array-constructor": ["warn"],
  136. "no-bitwise": ["warn"],
  137. "no-continue": ["warn"],
  138. "no-inline-comments": ["off"],
  139. "no-lonely-if": ["warn"],
  140. "no-mixed-operators": ["warn"],
  141. "no-mixed-spaces-and-tabs": ["warn"],
  142. "no-multiple-empty-lines": ["warn", { max: 4 }],
  143. "no-negated-condition": ["warn"],
  144. "no-nested-ternary": ["error"],
  145. "no-new-object": ["error"],
  146. "no-plusplus": ["off"],
  147. "no-restricted-syntax": ["off"],
  148. "no-spaced-func": ["warn"],
  149. "no-ternary": ["off"],
  150. "no-trailing-spaces": ["warn"],
  151. "no-underscore-dangle": ["warn"],
  152.  
  153. "no-unneeded-ternary": ["error"],
  154. "no-whitespace-before-property": ["error"],
  155. "object-curly-newline": ["off"],
  156. "object-curly-spacing": ["error", "never"],
  157. "object-property-newline": ["off"],
  158. "one-var-declaration-per-line": ["off"],
  159. "one-var": ["off"],
  160. "operator-assignment": ["off"],
  161. "operator-linebreak": ["warn", "before"],
  162. "padded-blocks": ["off"],
  163. "quote-props": ["warn", "as-needed"],
  164. "quotes": ["warn", "single"],
  165. "require-jsdoc": ["off"],
  166. "semi-spacing": ["warn"],
  167. "semi": ["error", "always"],
  168. "sort-vars": ["off"],
  169. "space-before-blocks": ["warn"],
  170. "space-before-function-paren": ["warn", "never"],
  171. "space-in-parens": ["warn", "never"],
  172. "space-infix-ops": ["warn"],
  173. "space-unary-ops": ["warn"],
  174. "spaced-comment": ["off"],
  175. "unicode-bom": ["warn"],
  176. "wrap-regex": ["error"]
  177. }
  178. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement