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.

184 lines
4.3 KiB

  1. env:
  2. browser: true
  3. # See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
  4. parserOptions:
  5. ecmaVersion: 2017
  6. # Globals available in Odoo that shouldn't produce errorings
  7. globals:
  8. _: readonly
  9. $: readonly
  10. fuzzy: readonly
  11. jQuery: readonly
  12. moment: readonly
  13. odoo: readonly
  14. openerp: readonly
  15. Promise: readonly
  16. owl: readonly
  17. # Styling is handled by Prettier, so we only need to enable AST rules;
  18. # see https://github.com/OCA/maintainer-quality-tools/pull/618#issuecomment-558576890
  19. rules:
  20. accessor-pairs: warn
  21. array-callback-return: warn
  22. callback-return: warn
  23. capitalized-comments:
  24. - warn
  25. - always
  26. - ignoreConsecutiveComments: true
  27. ignoreInlineComments: true
  28. complexity:
  29. - warn
  30. - 15
  31. constructor-super: warn
  32. dot-notation: warn
  33. eqeqeq: warn
  34. global-require: warn
  35. handle-callback-err: warn
  36. id-blacklist: warn
  37. id-match: warn
  38. init-declarations: error
  39. max-depth: warn
  40. max-nested-callbacks: warn
  41. max-statements-per-line: warn
  42. no-alert: warn
  43. no-array-constructor: warn
  44. no-caller: warn
  45. no-case-declarations: warn
  46. no-class-assign: warn
  47. no-cond-assign: error
  48. no-const-assign: error
  49. no-constant-condition: warn
  50. no-control-regex: warn
  51. no-debugger: error
  52. no-delete-var: warn
  53. no-div-regex: warn
  54. no-dupe-args: error
  55. no-dupe-class-members: error
  56. no-dupe-keys: error
  57. no-duplicate-case: error
  58. no-duplicate-imports: error
  59. no-else-return: warn
  60. no-empty-character-class: warn
  61. no-empty-function: error
  62. no-empty-pattern: error
  63. no-empty: warn
  64. no-eq-null: error
  65. no-eval: error
  66. no-ex-assign: error
  67. no-extend-native: warn
  68. no-extra-bind: warn
  69. no-extra-boolean-cast: warn
  70. no-extra-label: warn
  71. no-fallthrough: warn
  72. no-func-assign: error
  73. no-global-assign: error
  74. no-implicit-coercion:
  75. - warn
  76. - allow: ["~"]
  77. no-implicit-globals: warn
  78. no-implied-eval: warn
  79. no-inline-comments: warn
  80. no-inner-declarations: warn
  81. no-invalid-regexp: warn
  82. no-irregular-whitespace: warn
  83. no-iterator: warn
  84. no-label-var: warn
  85. no-labels: warn
  86. no-lone-blocks: warn
  87. no-lonely-if: error
  88. no-mixed-requires: error
  89. no-multi-str: warn
  90. no-native-reassign: error
  91. no-negated-condition: warn
  92. no-negated-in-lhs: error
  93. no-new-func: warn
  94. no-new-object: warn
  95. no-new-require: warn
  96. no-new-symbol: warn
  97. no-new-wrappers: warn
  98. no-new: warn
  99. no-obj-calls: warn
  100. no-octal-escape: warn
  101. no-octal: warn
  102. no-param-reassign: off
  103. no-path-concat: warn
  104. no-process-env: warn
  105. no-process-exit: warn
  106. no-proto: warn
  107. no-prototype-builtins: warn
  108. no-redeclare: warn
  109. no-regex-spaces: warn
  110. no-restricted-globals: warn
  111. no-restricted-imports: warn
  112. no-restricted-modules: warn
  113. no-restricted-syntax: warn
  114. no-return-assign: error
  115. no-script-url: warn
  116. no-self-assign: warn
  117. no-self-compare: warn
  118. no-sequences: warn
  119. no-shadow-restricted-names: warn
  120. no-shadow: warn
  121. no-sparse-arrays: warn
  122. no-sync: warn
  123. no-this-before-super: warn
  124. no-throw-literal: warn
  125. no-undef-init: warn
  126. no-undef: error
  127. no-unmodified-loop-condition: warn
  128. no-unneeded-ternary: error
  129. no-unreachable: error
  130. no-unsafe-finally: error
  131. no-unused-expressions: error
  132. no-unused-labels: error
  133. no-unused-vars:
  134. - error
  135. - args: none
  136. no-use-before-define: error
  137. no-useless-call: warn
  138. no-useless-computed-key: warn
  139. no-useless-concat: warn
  140. no-useless-constructor: warn
  141. no-useless-escape: warn
  142. no-useless-rename: warn
  143. no-void: warn
  144. no-with: warn
  145. operator-assignment: [error, always]
  146. prefer-const: warn
  147. radix: warn
  148. require-yield: warn
  149. sort-imports: warn
  150. spaced-comment: [error, always]
  151. space-before-function-paren: ["warn", {"anonymous": "always", "named": "never"}]
  152. strict: [error, function]
  153. use-isnan: error
  154. valid-jsdoc:
  155. - warn
  156. - prefer:
  157. arg: param
  158. argument: param
  159. augments: extends
  160. constructor: class
  161. exception: throws
  162. func: function
  163. method: function
  164. prop: property
  165. return: returns
  166. virtual: abstract
  167. yield: yields
  168. preferType:
  169. array: Array
  170. bool: Boolean
  171. boolean: Boolean
  172. number: Number
  173. object: Object
  174. str: String
  175. string: String
  176. requireParamDescription: false
  177. requireReturn: false
  178. requireReturnDescription: false
  179. requireReturnType: false
  180. valid-typeof: warn
  181. yoda: warn