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.

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