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