Guest User

Untitled

a guest
Jan 17th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.63 KB | None | 0 0
  1. {
  2. "parserOptions": {
  3. "ecmaVersion": 6,
  4. "sourceType": "module",
  5. },
  6.  
  7. "env": {
  8. "browser": true,
  9. "es6": true,
  10. "worker": true
  11. },
  12.  
  13. globals: {
  14. "Ext": true,
  15. "Ciss": true,
  16. "CISSMob": true,
  17. "exports": false
  18. },
  19.  
  20. "rules": {
  21. // Possible errors
  22. "for-direction": "error",
  23. "no-cond-assign": ["error", "except-parens"],
  24. "no-constant-condition": ["error", {
  25. "checkLoops": false,
  26. }],
  27. "no-dupe-args": "error",
  28. "no-dupe-keys": "error",
  29. "no-duplicate-case": "error",
  30. "no-empty": ["error", {
  31. "allowEmptyCatch": true,
  32. }],
  33. "no-ex-assign": "error",
  34. "no-extra-boolean-cast": "error",
  35. "no-extra-semi": "error",
  36. "no-func-assign": "error",
  37. "no-inner-declarations": ["error", "functions"],
  38. "no-invalid-regexp": "error",
  39. "no-irregular-whitespace": "error",
  40. "no-obj-calls": "error",
  41. "no-regex-spaces": "error",
  42. "no-sparse-arrays": "error",
  43. "no-unexpected-multiline": "error",
  44. "no-unreachable": "error",
  45. "no-unsafe-finally": "error",
  46. "no-unsafe-negation": "error",
  47. "use-isnan": "error",
  48. "valid-typeof": ["error", {
  49. "requireStringLiterals": true,
  50. }],
  51.  
  52. // Best Practices
  53. "accessor-pairs": ["error", {
  54. "setWithoutGet": true,
  55. }],
  56. "curly": ["error", "all"],
  57. // "eqeqeq": ["error", "always"],
  58. "no-caller": "error",
  59. "no-else-return": "error",
  60. "no-empty-pattern": "error",
  61. "no-eval": "error",
  62. "no-extend-native": "error",
  63. "no-extra-bind": "error",
  64. "no-extra-label": "error",
  65. "no-fallthrough": "error",
  66. "no-floating-decimal": "error",
  67. "no-global-assign": "error",
  68. "no-implied-eval": "error",
  69. "no-iterator": "error",
  70. "no-lone-blocks": "error",
  71. "no-multi-spaces": ["error", {
  72. "ignoreEOLComments": true,
  73. }],
  74. "no-multi-str": "error",
  75. "no-new-func": "error",
  76. "no-new-wrappers": "error",
  77. "no-new": "error",
  78. "no-octal-escape": "error",
  79. "no-octal": "error",
  80. "no-redeclare": "error",
  81. "no-self-assign": "error",
  82. "no-self-compare": "error",
  83. "no-throw-literal": "error",
  84. "no-unused-expressions": "error",
  85. "no-unused-labels": "error",
  86. "no-useless-call": "error",
  87. "no-useless-concat": "error",
  88. "prefer-promise-reject-errors": "error",
  89. "wrap-iife": ["error", "any"],
  90. "yoda": ["error", "never", {
  91. "exceptRange": true,
  92. }],
  93.  
  94. // Strict Mode
  95. "strict": ["off", "global"],
  96.  
  97. // Variables
  98. "no-catch-shadow": "error",
  99. "no-delete-var": "error",
  100. "no-label-var": "error",
  101. "no-shadow-restricted-names": "error",
  102. "no-shadow": "off",
  103. "no-undef-init": "error",
  104. "no-undef": ["error", {
  105. "typeof": true,
  106. }],
  107. "no-unused-vars": ["error", {
  108. "vars": "local",
  109. "args": "none",
  110. }],
  111.  
  112. // Stylistic Issues
  113. "array-bracket-spacing": ["error", "never"],
  114. "block-spacing": ["error", "always"],
  115. "brace-style": ["error", "1tbs", {
  116. "allowSingleLine": false,
  117. }],
  118. "comma-dangle": ["error", {
  119. "arrays": "ignore",
  120. "objects": "ignore",
  121. "imports": "never",
  122. "exports": "always",
  123. "functions": "never",
  124. }],
  125. "comma-spacing": ["error", {
  126. "before": false,
  127. "after": true,
  128. }],
  129. "comma-style": ["error", "last"],
  130. // "eol-last": "error",
  131. "func-call-spacing": ["error", "never"],
  132. "key-spacing": ["error", {
  133. "beforeColon": false,
  134. "afterColon": true,
  135. "mode": "strict",
  136. }],
  137. "keyword-spacing": ["error", {
  138. "before": true,
  139. "after": true,
  140. }],
  141. "linebreak-style": ["error", "unix"],
  142. "lines-between-class-members": ["error", "always"],
  143. "new-cap": ["error", {
  144. "newIsCap": true,
  145. "capIsNew": false,
  146. }],
  147. "new-parens": "error",
  148. "no-array-constructor": "error",
  149. "no-multiple-empty-lines": ["error", {
  150. "max": 1,
  151. "maxEOF": 0,
  152. "maxBOF": 1,
  153. }],
  154. "no-new-object": "error",
  155. "no-tabs": "error",
  156. "no-trailing-spaces": ["error", {
  157. "skipBlankLines": false,
  158. }],
  159. "no-whitespace-before-property": "error",
  160. "object-curly-spacing": ["error", "always"],
  161. "operator-linebreak": ["error", "after", {
  162. "overrides": {
  163. ":": "ignore",
  164. }
  165. }],
  166. "quotes": ["error", "single"],
  167. "semi-spacing": ["error", {
  168. "before": false,
  169. "after": true,
  170. }],
  171. "semi": ["error", "always"],
  172. "space-before-blocks": ["error", "always"],
  173. "space-before-function-paren": ["error", {
  174. "anonymous": "ignore",
  175. "named": "never",
  176. }],
  177. "space-in-parens": ["error", "never"],
  178. "space-infix-ops": ["error", {
  179. "int32Hint": false
  180. }],
  181. "space-unary-ops": ["error", {
  182. "words": true,
  183. "nonwords": false,
  184. }],
  185. "spaced-comment": ["error", "always", {
  186. "line": {
  187. "exceptions": ["//", "#else", "#endif"],
  188. "markers": ["#if", "#elif", "#include", "#expand", "#error"],
  189. },
  190. "block": {
  191. "balanced": true,
  192. }
  193. }],
  194.  
  195. // ECMAScript 6
  196. "arrow-body-style": ["error", "always"],
  197. "arrow-parens": ["error", "always"],
  198. "arrow-spacing": ["error", {
  199. "before": true,
  200. "after": true,
  201. }],
  202. "constructor-super": "error",
  203. "no-class-assign": "error",
  204. "no-confusing-arrow": "error",
  205. "no-const-assign": "error",
  206. "no-dupe-class-members": "error",
  207. "no-duplicate-imports": "error",
  208. "no-this-before-super": "error",
  209. "no-useless-computed-key": "error",
  210. "no-useless-constructor": "error",
  211. "no-useless-rename": "error",
  212. "no-var": "off",
  213. // "object-shorthand": ["error", "always", {
  214. // "avoidQuotes": false,
  215. // }],
  216. "rest-spread-spacing": ["error", "never"],
  217. "sort-imports": ["error", {
  218. "ignoreCase": true,
  219. }],
  220. "template-curly-spacing": ["error", "never"],
  221. },
  222. }
Add Comment
Please, Sign In to add comment