Skip to content

Commit 7d018f3

Browse files
committed
applied generic addons repo template
1 parent 6844a83 commit 7d018f3

8 files changed

+853
-0
lines changed

.copier-answers.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_commit: 2e86af0
2+
_src_path: [email protected]:ScalizerOrg/s6r-odoo-addons-template.git
3+
odoo_version: 17.0

.eslintrc.yml

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

.github/workflows/pre-commit.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: pre-commit
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- 10.0
7+
- 11.0
8+
- 12.0
9+
- 13.0
10+
- 14.0
11+
- 15.0
12+
- 16.0
13+
- 17.0
14+
push:
15+
branches:
16+
- 10.0
17+
- 11.0
18+
- 12.0
19+
- 13.0
20+
- 14.0
21+
- 15.0
22+
- 16.0
23+
- 17.0
24+
25+
26+
jobs:
27+
pre-commit:
28+
runs-on: ubuntu-22.04
29+
steps:
30+
- uses: actions/checkout@v2
31+
- uses: actions/setup-python@v2
32+
- name: Get python version
33+
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
34+
- uses: actions/cache@v1
35+
with:
36+
path: ~/.cache/pre-commit
37+
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
38+
- name: Install pre-commit
39+
run: pip install pre-commit
40+
- name: Run pre-commit
41+
run: pre-commit run --all-files --show-diff-on-failure --color=always
42+
- name: Check that all files generated by pre-commit are in git
43+
run: |
44+
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
45+
if [ "$newfiles" != "" ] ; then
46+
echo "Please check-in the following files:"
47+
echo "$newfiles"
48+
exit 1
49+
fi

0 commit comments

Comments
 (0)