Site web de Bio Hauts de France
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.

245 lines
7.1KB

  1. {
  2. "globals": {
  3. "L": true,
  4. },
  5. "env": {
  6. "browser": true,
  7. "es6": true
  8. },
  9. "parserOptions": {
  10. "ecmaFeatures": {
  11. "impliedStrict": true,
  12. "jsx": false
  13. },
  14. "ecmaVersion": 6,
  15. "sourceType": "module"
  16. },
  17. "extends": ["eslint:recommended"],
  18. "rules": {
  19. // Possible Errors
  20. "no-await-in-loop": "error",
  21. "no-extra-parens": "error",
  22. "no-prototype-builtins": "error",
  23. "no-template-curly-in-string": "error",
  24. "valid-jsdoc": "error",
  25. // Best Practices
  26. "accessor-pairs": "error",
  27. "array-callback-return": "error",
  28. "block-scoped-var": "error",
  29. "class-methods-use-this": "off",
  30. "complexity": "error",
  31. "consistent-return": "error",
  32. "curly": "error",
  33. "default-case": "error",
  34. "dot-location": ["error", "property"],
  35. "dot-notation": "error",
  36. "eqeqeq": "error",
  37. "guard-for-in": "error",
  38. "no-alert": "error",
  39. "no-caller": "error",
  40. "no-div-regex": "error",
  41. "no-else-return": "error",
  42. "no-empty-function": "error",
  43. "no-eq-null": "error",
  44. "no-eval": "error",
  45. "no-extend-native": "error",
  46. "no-extra-bind": "error",
  47. "no-extra-label": "error",
  48. "no-floating-decimal": "error",
  49. "no-implicit-coercion": "error",
  50. "no-implicit-globals": "error",
  51. "no-implied-eval": "error",
  52. "no-invalid-this": "off",
  53. "no-iterator": "error",
  54. "no-labels": "error",
  55. "no-lone-blocks": "error",
  56. "no-loop-func": "error",
  57. /*
  58. "no-magic-numbers": ["error", {
  59. "ignore": [-1, 0, 1],
  60. "ignoreArrayIndexes": true
  61. }
  62. ],
  63. */
  64. "no-multi-spaces": ["error", {
  65. "ignoreEOLComments": true,
  66. "exceptions": {
  67. "AssignmentExpression": true,
  68. "ArrowFunctionExpression": true,
  69. "CallExpression": true,
  70. "VariableDeclarator": true
  71. }
  72. }
  73. ],
  74. "no-multi-str": "error",
  75. "no-new": "error",
  76. "no-new-func": "error",
  77. "no-new-wrappers": "error",
  78. "no-octal-escape": "error",
  79. "no-param-reassign": "off",
  80. "no-proto": "error",
  81. "no-restricted-properties": "error",
  82. "no-return-assign": "error",
  83. "no-return-await": "error",
  84. "no-script-url": "error",
  85. "no-self-compare": "error",
  86. "no-sequences": "error",
  87. "no-throw-literal": "error",
  88. "no-unmodified-loop-condition": "error",
  89. "no-unused-expressions": "error",
  90. "no-useless-call": "error",
  91. "no-useless-concat": "error",
  92. "no-useless-return": "error",
  93. "no-void": "error",
  94. "no-warning-comments": "off",
  95. "no-with": "error",
  96. "prefer-promise-reject-errors": "error",
  97. "radix": "error",
  98. "require-await": "error",
  99. "vars-on-top": "error",
  100. "wrap-iife": "error",
  101. "yoda": "error",
  102. // Strict Mode
  103. "strict": "error",
  104. // Variables
  105. "init-declarations": "off",
  106. "no-catch-shadow": "error",
  107. "no-label-var": "error",
  108. "no-restricted-globals": "error",
  109. "no-shadow": "off",
  110. "no-shadow-restricted-names": "error",
  111. "no-undef-init": "error",
  112. "no-undefined": "error",
  113. "no-use-before-define": "off",
  114. // Node.js and CommonJS
  115. "callback-return": "off",
  116. "global-require": "error",
  117. "handle-callback-err": "error",
  118. "no-mixed-requires": "error",
  119. "no-new-require": "error",
  120. "no-path-concat": "error",
  121. "no-process-env": "error",
  122. "no-process-exit": "error",
  123. "no-restricted-modules": "error",
  124. "no-sync": "error",
  125. // Stylistic Issues
  126. "array-bracket-spacing": "error",
  127. "block-spacing": "error",
  128. "brace-style": "error",
  129. "camelcase": "error",
  130. "capitalized-comments": "off",
  131. "comma-dangle": "error",
  132. "comma-spacing": "error",
  133. "comma-style": "error",
  134. "computed-property-spacing": "error",
  135. "consistent-this": "error",
  136. "eol-last": "error",
  137. "func-call-spacing": "error",
  138. "func-name-matching": "error",
  139. "func-names": "off",
  140. "func-style": ["error", "declaration"],
  141. "id-blacklist": "error",
  142. "id-length": "off",
  143. "id-match": "error",
  144. "indent": ["error", 2, { "SwitchCase": 1 }],
  145. "jsx-quotes": "error",
  146. "key-spacing": "off",
  147. "keyword-spacing": "error",
  148. "linebreak-style": ["error", "unix"],
  149. "line-comment-position": "off",
  150. "lines-around-comment": "off",
  151. "lines-around-directive": "error",
  152. "max-depth": ["error", 10],
  153. "max-len": "off",
  154. "max-lines": "off",
  155. "max-nested-callbacks": "error",
  156. "max-params": "off",
  157. "max-statements": "off",
  158. "max-statements-per-line": "error",
  159. "multiline-ternary": "off",
  160. "new-cap": ["error", { "capIsNewExceptionPattern": "$.*" }],
  161. "newline-after-var": "off",
  162. "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 5 }],
  163. "new-parens": "error",
  164. "no-array-constructor": "error",
  165. "no-bitwise": "error",
  166. "no-continue": "off",
  167. "no-inline-comments": "off",
  168. "no-lonely-if": "error",
  169. "no-mixed-operators": "off",
  170. "no-multi-assign": "error",
  171. "no-multiple-empty-lines": "error",
  172. "nonblock-statement-body-position": "error",
  173. "no-negated-condition": "off",
  174. "no-nested-ternary": "error",
  175. "no-new-object": "error",
  176. "no-plusplus": "off",
  177. "no-restricted-syntax": "error",
  178. "no-tabs": "error",
  179. "no-ternary": "off",
  180. "no-trailing-spaces": "error",
  181. "no-underscore-dangle": "off",
  182. "no-unneeded-ternary": "error",
  183. "no-whitespace-before-property": "error",
  184. "object-curly-newline": ["error", { "minProperties": 1 }],
  185. "object-curly-spacing": ["error", "always"],
  186. "object-property-newline": "error",
  187. "one-var": ["error", "never"],
  188. "one-var-declaration-per-line": "error",
  189. "operator-assignment": "error",
  190. "operator-linebreak": "error",
  191. "padded-blocks": ["error", "never"],
  192. "padding-line-between-statements": "off",
  193. "quote-props": ["error", "as-needed"],
  194. "quotes": ["error", "single"],
  195. "require-jsdoc": "off",
  196. "semi": ["error", "always"],
  197. "semi-spacing": "error",
  198. "sort-keys": "off",
  199. "sort-vars": "error",
  200. "space-before-blocks": "error",
  201. "space-before-function-paren": ["error", {
  202. "anonymous": "always",
  203. "named": "never"
  204. }],
  205. "space-in-parens": "error",
  206. "space-infix-ops": "error",
  207. "space-unary-ops": "error",
  208. "spaced-comment": "error",
  209. "template-tag-spacing": "error",
  210. "unicode-bom": "error",
  211. "wrap-regex": "off",
  212. // ECMAScript 6
  213. "arrow-body-style": ["error", "as-needed"],
  214. "arrow-parens": "error",
  215. "arrow-spacing": "error",
  216. "generator-star-spacing": "error",
  217. "no-confusing-arrow": "error",
  218. "no-duplicate-imports": "error",
  219. "no-restricted-imports": "error",
  220. "no-useless-computed-key": "error",
  221. "no-useless-constructor": "error",
  222. "no-useless-rename": "error",
  223. "no-var": "error",
  224. "object-shorthand": "error",
  225. "prefer-arrow-callback": "error",
  226. "prefer-const": "error",
  227. "prefer-destructuring": "off",
  228. "prefer-numeric-literals": "error",
  229. "prefer-rest-params": "error",
  230. "prefer-spread": "error",
  231. "prefer-template": "error",
  232. "rest-spread-spacing": "error",
  233. "sort-imports": "error",
  234. "symbol-description": "error",
  235. "template-curly-spacing": "error",
  236. "yield-star-spacing": "error"
  237. }
  238. }