Facilite la gestion et la valorisation du bénévolat dans les associations. https://benevalibre.org/
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.

240 lines
7.0KB

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