- Use of jsconfig instead of tsconfig
- jsconfig deployed with tooling, no need for CLI
- ecmascript bumped to version es2022 (static properties)
- prettierrc merged inside the eslintrc
- add a few globals
- cleanup package.json scripts
- add script to lint/format only the diff (opposed to staged files)
- bump up node packages versions
- use eslint as cli instead of prettier-eslint, as eslint does provide
parsable output for runbot.
- add the typescrit types of libs as dependencies + main.d.ts to
improve autompletion.
This upgrade makes it easier to deploy and use the js tooling, as it is
expected more and more people will use it if a lint check is added to
the runbot.
About the runbot:
The commit gets the code ready to enable the lint on the runbot.
It will lint the code with the same rules and same ignore file.
The only difference is the runbot will check only the diff and not the
entire commited file.
The goal will be to progressively (and aggressively) whitelist modules
to converge to a nice formatted codebase.
closesodoo/odoo#105165
Related: odoo/enterprise#34048
Signed-off-by: Michaël Mattiello <mcm@odoo.com>
With this commit, if realpath is not available (for exemple on macos),
the script is directly stopped.
closesodoo/odoo#90522
X-original-commit: 7857c577948d55842a5697ca6d91bb6ea656ef6e
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
Since fcf2e2210a639adfcdb9236c24cfb31046b6dead, the path of enterprise
is derived from the tooling path instead of the community path.
X-original-commit: 4ff8f62aa1e10d27189ebbdd22a01711c700ea32
Part-of: odoo/odoo#90522
In #86163 we added a check on the branch name to avoid running the
tooling on stable branches, however this check used bash-specific
syntax. While the hashbang in the pre-commit hook specifies that the
hook should be run using bash, we were using the npm module "husky" to
manage git hooks, which would ignore this hashbang and always run the
hook using sh, causing the hook to fail in all cases.
After some consideration, we have decided to stop using husky, as its
main purpose is to make hook management easier in npm-based projects.
Since we already need a script to enable the tooling, we can do
essentially the same thing that husky is doing but with more control
over the process with no drawbacks.
closesodoo/odoo#87436
X-original-commit: 3104ab16ecf88d4f7b1618db4d62e7f57df34e6c
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
If $basepath in the tooling contained spaces, it could have dramatic
consequences on the rm -rf command.
We simply escape everything to avoid the problem.
closesodoo/odoo#73222
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Provide an opt in js tooling system by adding a node env with prettier and eslint configured.
3 bash scripts are provided: enable.sh, disable.sh and reload.sh.
Enable.sh: add to the community root (and optionaly to the enterprise root) the env.
Disable.sh: remove the env.
Reload.sh: disable then enable.