You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

195 lines
5.0 KiB

  1. {
  2. "root": true,
  3. "parser": "babel-eslint",
  4. "env": {
  5. "es6": true,
  6. "node": true,
  7. "jest": true
  8. },
  9. "plugins": [
  10. "flowtype",
  11. "prettier",
  12. "react"
  13. ],
  14. // Map from global var to bool specifying if it can be redefined
  15. "globals": {
  16. "__DEV__": true,
  17. "__dirname": false,
  18. "__fbBatchedBridgeConfig": false,
  19. "alert": false,
  20. "cancelAnimationFrame": false,
  21. "cancelIdleCallback": false,
  22. "clearImmediate": true,
  23. "clearInterval": false,
  24. "clearTimeout": false,
  25. "console": false,
  26. "document": false,
  27. "escape": false,
  28. "Event": false,
  29. "EventTarget": false,
  30. "exports": false,
  31. "fetch": false,
  32. "FormData": false,
  33. "global": false,
  34. "jest": false,
  35. "Map": true,
  36. "module": false,
  37. "navigator": false,
  38. "process": false,
  39. "Promise": true,
  40. "requestAnimationFrame": true,
  41. "requestIdleCallback": true,
  42. "require": false,
  43. "Set": true,
  44. "setImmediate": true,
  45. "setInterval": false,
  46. "setTimeout": false,
  47. "window": false,
  48. "XMLHttpRequest": false,
  49. "pit": false,
  50. "extend": true,
  51. "_": true,
  52. "io": true,
  53. "cons": true,
  54. "atlas": true,
  55. "instancer": true
  56. },
  57. "rules": {
  58. "comma-dangle": [2,"never"],
  59. "no-cond-assign": [2,"always"],
  60. "no-console": 1,
  61. "no-constant-condition": 2,
  62. "no-control-regex": 2,
  63. "no-debugger": 1,
  64. "no-dupe-args": 2,
  65. "no-dupe-keys": 2,
  66. "no-duplicate-case": 2,
  67. "no-empty-character-class": 2,
  68. "no-empty": [2, { "allowEmptyCatch": true }],
  69. "no-ex-assign": 2,
  70. "no-extra-semi": 2,
  71. "no-func-assign": 2,
  72. "no-inner-declarations": [2,"functions"],
  73. "no-invalid-regexp": 2,
  74. "no-irregular-whitespace": 2,
  75. "no-negated-in-lhs": 2,
  76. "no-obj-calls": 2,
  77. "no-regex-spaces": 2,
  78. "no-sparse-arrays": 2,
  79. "no-unreachable": 1,
  80. "use-isnan": 2,
  81. "valid-typeof": 2,
  82. "block-scoped-var": 2,
  83. "curly": [2,"multi-or-nest"],
  84. "dot-notation": 2,
  85. "dot-location": [2,"property"],
  86. "eqeqeq": [2,"smart"],
  87. "no-alert": 2,
  88. "no-caller": 2,
  89. "no-else-return": 2,
  90. "no-eq-null": 2,
  91. "no-eval": 2,
  92. "no-extend-native": 2,
  93. "no-fallthrough": 2,
  94. "no-floating-decimal": 2,
  95. "no-implied-eval": 2,
  96. "no-iterator": 2,
  97. "no-labels": 2,
  98. "no-lone-blocks": 2,
  99. "no-multi-spaces": 2,
  100. "no-native-reassign": 2,
  101. "no-new-func": 2,
  102. "no-new-wrappers": 2,
  103. "no-new": 2,
  104. "no-octal-escape": 2,
  105. "no-octal": 2,
  106. "no-process-env": 1,
  107. "no-proto": 2,
  108. "no-redeclare": 2,
  109. "no-return-assign": [2,"always"],
  110. "no-script-url": 2,
  111. "no-self-compare": 2,
  112. "no-sequences": 2,
  113. "no-throw-literal": 2,
  114. "no-unused-expressions": 2,
  115. "no-useless-call": 2,
  116. "no-void": 2,
  117. "no-with": 2,
  118. "wrap-iife": [2,"inside"],
  119. "yoda": [2,"never",{}],
  120. "strict": [2,"global"],
  121. "no-catch-shadow": 2,
  122. "no-delete-var": 2,
  123. "no-label-var": 2,
  124. "no-shadow-restricted-names": 2,
  125. "no-shadow": [2,{"builtinGlobals":true,"hoist":"all"}],
  126. "no-undef-init": 2,
  127. "no-undef": 2,
  128. "no-undefined": 2,
  129. "no-unused-vars": 1,
  130. "no-use-before-define": 2,
  131. "no-mixed-requires": [2,false],
  132. "no-new-require": 2,
  133. "no-path-concat": 2,
  134. "no-process-exit": 1,
  135. "brace-style": [2,"1tbs",{}],
  136. "camelcase": [1,{"properties":"always"}],
  137. "comma-spacing": [2,{"after":true}],
  138. "comma-style": 2,
  139. "eol-last": 2,
  140. "func-style": [1,"expression"],
  141. "indent": [2, "tab"],
  142. "key-spacing": [2,{"afterColon":true}],
  143. "new-parens": 2,
  144. "no-inline-comments": 2,
  145. "no-lonely-if": 2,
  146. "no-mixed-spaces-and-tabs": 2,
  147. "no-multiple-empty-lines": [2,{"max":1}],
  148. "no-nested-ternary": 1,
  149. "no-new-object": 2,
  150. "no-spaced-func": 2,
  151. "no-underscore-dangle": 1,
  152. "no-unneeded-ternary": 2,
  153. "object-curly-spacing": [2,"always",{"arraysInObjects":true,"objectsInObjects":true}],
  154. "padded-blocks": [2,"never"],
  155. "quote-props": [2,"as-needed"],
  156. "quotes": [2,"single","avoid-escape"],
  157. "semi-spacing": [2,{"after":true}],
  158. "semi": [2,"always"],
  159. "space-before-blocks": [2,"always"],
  160. "space-before-function-paren": [2,"always"],
  161. "space-infix-ops": 2,
  162. "keyword-spacing": [2,{"before":true,"after":true}],
  163. "arrow-parens": [2,"as-needed"],
  164. "arrow-spacing": [2,{"before":true,"after":true}],
  165. "no-const-assign": 2,
  166. "no-var": 2,
  167. // React Plugin
  168. // The following rules are made available via `eslint-plugin-react`.
  169. "react/display-name": 0,
  170. "react/jsx-boolean-value": 0,
  171. "react/jsx-no-comment-textnodes": 1,
  172. "react/jsx-no-duplicate-props": 2,
  173. "react/jsx-no-undef": 1,
  174. "react/jsx-sort-props": 0,
  175. "react/jsx-uses-react": 1,
  176. "react/jsx-uses-vars": 1,
  177. "react/no-did-mount-set-state": 1,
  178. "react/no-did-update-set-state": 1,
  179. "react/no-multi-comp": 0,
  180. "react/no-string-refs": 1,
  181. "react/no-unknown-property": 0,
  182. "react/prop-types": 0,
  183. "react/react-in-jsx-scope": 1,
  184. "react/self-closing-comp": 1,
  185. "react/wrap-multilines": 0
  186. }
  187. }