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. es6: true
  4. # See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
  5. parserOptions:
  6. ecmaVersion: 2017
  7. # Globals available in Odoo that shouldn't produce errorings
  8. globals:
  9. _: readonly
  10. $: readonly
  11. fuzzy: readonly
  12. jQuery: readonly
  13. moment: readonly
  14. odoo: readonly
  15. openerp: 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: warn
  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: error
  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