-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX] Support ecmaVersion 2022 #259
Conversation
Please do it only for 17.0 |
55566fb
to
5d0a238
Compare
I think you should limit the previous template, and please also check #258 |
5d0a238
to
bf16d48
Compare
That issue states that the new templating is used from eslint 9.3.0, but version 8.24.0 is being used right now.
|
bf16d48
to
c84ede3
Compare
Yes, but the idea is that you also update |
Let my try it locally anyway |
0ab05f7
to
0d22ac6
Compare
Well, I'm finding some issues locally with how the new eslint config works in a modular way... I can't figure out how to make it work, I'm afraid. How's that an issue in any case? Isn't it just a nice to have? |
Yes, it was just a PoC. Then continue with the current esLint or bump it to the last compatible one. |
4c4105b
to
be99b9d
Compare
Ok, tried locally and working |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like both eslintrc files are pretty similar. Couldn't you just name this file {% if odoo_version > 12 %}.eslintrc.yml{% endif %}.jinja
(notice the .jinja
suffix) and template whatever you need inside of it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I read correctly the previous version, it was changing the ecmaVersion for all the versions, not only v17. Maybe I was wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, you both are right 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean that you can put:
ecmaVersion: {% if odoo_version < 17 %}2019{% else %}2022{% endif %}
In a single file and avoid having 2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done :)
Odoo officially supports ecmaVersion 2022 from v17: https://github.com/odoo/odoo/blame/9a11717c17b860ec2f1b2e228517c0d3945c474a/addons/web/tooling/_eslintrc.json#L9
be99b9d
to
a90f23a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Code review only.
This PR has the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you merge this and issue a new version? This can be applied massively to 17.0 branches. It shouldn't be too much problem, as we come from a massive update recently.
Odoo officially supports ecmaVersion 2022 from v17: https://github.com/odoo/odoo/blame/9a11717c17b860ec2f1b2e228517c0d3945c474a/addons/web/tooling/_eslintrc.json#L9
Possible fixes:
What do you think?