Skip to content

Commit c521e55

Browse files
committed
Initialize 14.0 branch
1 parent 857ca9c commit c521e55

31 files changed

+1135
-239
lines changed

.copier-answers.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Do NOT update manually; changes here will be overwritten by Copier
2+
_commit: v1.1.1
3+
_src_path: https://github.com/OCA/oca-addons-repo-template.git
4+
dependency_installation_mode: PIP
5+
generate_requirements_txt: true
6+
include_wkhtmltopdf: false
7+
odoo_version: 14.0
8+
rebel_module_groups: []
9+
repo_description:
10+
This repo holds addons developed to ease the development of REST services into Odoo.
11+
repo_name: REST frameworks
12+
repo_slug: rest-framework
13+
travis_apt_packages: []
14+
travis_apt_sources: []

.editorconfig

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ indent_style = space
77
insert_final_newline = true
88
trim_trailing_whitespace = true
99

10-
[.eslintrc,*.{json,yml,yaml,rst,md}]
10+
[*.{json,yml,yaml,rst,md}]
1111
indent_size = 2
1212

1313
# Do not configure editor for libs and autogenerated content
14-
[*/static/{lib,src/lib}/**,*/static/description/index.html,*/readme/../README.rst]
14+
[{*/static/{lib,src/lib}/**,*/static/description/index.html,*/readme/../README.rst}]
1515
charset = unset
1616
end_of_line = unset
1717
indent_size = unset

.eslintrc

+70-60
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,12 @@
5252
"no-fallthrough": "warn",
5353
"no-floating-decimal": "warn",
5454
"no-func-assign": "warn",
55-
"no-implicit-coercion": ["warn", {
56-
"allow": ["~"]
57-
}],
55+
"no-implicit-coercion": [
56+
"warn",
57+
{
58+
"allow": ["~"]
59+
}
60+
],
5861
"no-implicit-globals": "warn",
5962
"no-implied-eval": "warn",
6063
"no-inline-comments": "warn",
@@ -151,20 +154,24 @@
151154
"brace-style": "warn",
152155
"callback-return": "warn",
153156
"camelcase": "off",
154-
"capitalized-comments": ["warn", "always", {
155-
"ignoreConsecutiveComments": true,
156-
"ignoreInlineComments": true
157-
}],
157+
"capitalized-comments": [
158+
"warn",
159+
"always",
160+
{
161+
"ignoreConsecutiveComments": true,
162+
"ignoreInlineComments": true
163+
}
164+
],
158165
"comma-dangle": ["warn", "always-multiline"],
159-
"comma-spacing": ["warn", {
160-
"before": false,
161-
"after": true
162-
}],
163-
"comma-style": "warn",
164-
"complexity": [
166+
"comma-spacing": [
165167
"warn",
166-
15
168+
{
169+
"before": false,
170+
"after": true
171+
}
167172
],
173+
"comma-style": "warn",
174+
"complexity": ["warn", 15],
168175
"computed-property-spacing": "off",
169176
"consistent-return": "off",
170177
"consistent-this": "off",
@@ -189,17 +196,17 @@
189196
"jsx-quotes": "warn",
190197
"key-spacing": "off",
191198
"keyword-spacing": "warn",
192-
"linebreak-style": [
193-
"warn",
194-
"unix"
195-
],
199+
"linebreak-style": ["warn", "unix"],
196200
"lines-around-comment": "warn",
197201
"max-depth": "warn",
198-
"max-len": ["warn", {
199-
"code": 88,
200-
"ignorePattern": "odoo\\.define\\(",
201-
"tabWidth": 4
202-
}],
202+
"max-len": [
203+
"warn",
204+
{
205+
"code": 88,
206+
"ignorePattern": "odoo\\.define\\(",
207+
"tabWidth": 4
208+
}
209+
],
203210
"max-lines": "off",
204211
"max-nested-callbacks": "warn",
205212
"max-params": "off",
@@ -211,11 +218,14 @@
211218
"newline-after-var": "off",
212219
"newline-before-return": "off",
213220
"newline-per-chained-call": "off",
214-
"object-curly-newline": ["warn", { "consistent": true }],
221+
"object-curly-newline": ["warn", {"consistent": true}],
215222
"object-curly-spacing": ["warn", "never"],
216-
"object-property-newline": ["warn", {
217-
"allowAllPropertiesOnSameLine": true
218-
}],
223+
"object-property-newline": [
224+
"warn",
225+
{
226+
"allowAllPropertiesOnSameLine": true
227+
}
228+
],
219229
"object-shorthand": "off",
220230
"one-var": "off",
221231
"one-var-declaration-per-line": "off",
@@ -233,10 +243,7 @@
233243
"radix": "warn",
234244
"require-yield": "warn",
235245
"rest-spread-spacing": "off",
236-
"semi": [
237-
"warn",
238-
"always"
239-
],
246+
"semi": ["warn", "always"],
240247
"semi-spacing": "warn",
241248
"sort-imports": "warn",
242249
"sort-vars": "off",
@@ -250,34 +257,37 @@
250257
"template-curly-spacing": "off",
251258
"unicode-bom": "warn",
252259
"use-isnan": "warn",
253-
"valid-jsdoc": ["warn", {
254-
"prefer": {
255-
"arg": "param",
256-
"argument": "param",
257-
"augments": "extends",
258-
"constructor": "class",
259-
"exception": "throws",
260-
"func": "function",
261-
"method": "function",
262-
"prop": "property",
263-
"return": "returns",
264-
"virtual": "abstract",
265-
"yield": "yields"
266-
},
267-
"preferType": {
268-
"array": "Array",
269-
"bool": "Boolean",
270-
"boolean": "Boolean",
271-
"number": "Number",
272-
"object": "Object",
273-
"str": "String",
274-
"string": "String"
275-
},
276-
"requireParamDescription": false,
277-
"requireReturn": false,
278-
"requireReturnDescription": false,
279-
"requireReturnType": false
280-
}],
260+
"valid-jsdoc": [
261+
"warn",
262+
{
263+
"prefer": {
264+
"arg": "param",
265+
"argument": "param",
266+
"augments": "extends",
267+
"constructor": "class",
268+
"exception": "throws",
269+
"func": "function",
270+
"method": "function",
271+
"prop": "property",
272+
"return": "returns",
273+
"virtual": "abstract",
274+
"yield": "yields"
275+
},
276+
"preferType": {
277+
"array": "Array",
278+
"bool": "Boolean",
279+
"boolean": "Boolean",
280+
"number": "Number",
281+
"object": "Object",
282+
"str": "String",
283+
"string": "String"
284+
},
285+
"requireParamDescription": false,
286+
"requireReturn": false,
287+
"requireReturnDescription": false,
288+
"requireReturnType": false
289+
}
290+
],
281291
"valid-typeof": "warn",
282292
"vars-on-top": "off",
283293
"wrap-iife": "warn",
@@ -286,6 +296,6 @@
286296
"yoda": "warn"
287297
},
288298
"parserOptions": {
289-
"ecmaVersion": 2017
299+
"ecmaVersion": 2017
290300
}
291301
}

.eslintrc.yml

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

0 commit comments

Comments
 (0)