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.

187 lines
4.3 KiB

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