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.

181 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-path-concat: warn
  102. no-process-env: warn
  103. no-process-exit: warn
  104. no-proto: warn
  105. no-prototype-builtins: warn
  106. no-redeclare: warn
  107. no-regex-spaces: warn
  108. no-restricted-globals: warn
  109. no-restricted-imports: warn
  110. no-restricted-modules: warn
  111. no-restricted-syntax: warn
  112. no-return-assign: error
  113. no-script-url: warn
  114. no-self-assign: warn
  115. no-self-compare: warn
  116. no-sequences: warn
  117. no-shadow-restricted-names: warn
  118. no-shadow: warn
  119. no-sparse-arrays: warn
  120. no-sync: warn
  121. no-this-before-super: warn
  122. no-throw-literal: warn
  123. no-undef-init: warn
  124. no-undef: error
  125. no-unmodified-loop-condition: warn
  126. no-unneeded-ternary: error
  127. no-unreachable: error
  128. no-unsafe-finally: error
  129. no-unused-expressions: error
  130. no-unused-labels: error
  131. no-unused-vars:
  132. - error
  133. - args: none
  134. no-use-before-define: error
  135. no-useless-call: warn
  136. no-useless-computed-key: warn
  137. no-useless-concat: warn
  138. no-useless-constructor: warn
  139. no-useless-escape: warn
  140. no-useless-rename: warn
  141. no-void: warn
  142. no-with: warn
  143. operator-assignment: [error, always]
  144. prefer-const: warn
  145. radix: warn
  146. require-yield: warn
  147. sort-imports: warn
  148. spaced-comment: [error, always]
  149. strict: [error, function]
  150. use-isnan: error
  151. valid-jsdoc:
  152. - warn
  153. - prefer:
  154. arg: param
  155. argument: param
  156. augments: extends
  157. constructor: class
  158. exception: throws
  159. func: function
  160. method: function
  161. prop: property
  162. return: returns
  163. virtual: abstract
  164. yield: yields
  165. preferType:
  166. array: Array
  167. bool: Boolean
  168. boolean: Boolean
  169. number: Number
  170. object: Object
  171. str: String
  172. string: String
  173. requireParamDescription: false
  174. requireReturn: false
  175. requireReturnDescription: false
  176. requireReturnType: false
  177. valid-typeof: warn
  178. yoda: warn