-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Javascript Style #37
Comments
I would be in favor but looks like a big leap for the OCA. |
I like it. However, basically every line of JS code will violate that standard in OCA, so I don't think it's practical as of today. I don't feel like @elicoidal... 😏 ESLint also offers an additional benefit of being able to catch ES6+ code, which should be forbidden for all Odoo code as of today (see OCA/maintainer-tools#383). In v8-11 versions this saves a lot of hard debugging time with PhantomJS tests breaking the world. I think that a simple note in the docs that directs to our current ESLint config, which is currently quite hidden, and tells the developer to just install eslint and apply that configuration to know if his code is OK would be better. Let me ping @OCA/web-maintainers @OCA/website-maintainers @OCA/e-commerce-maintainers. |
@yajo Thanks for ESLint config link! |
Odoo 13 is not going to support it officially AFAIK. Odoo 12 does. |
👍 and we may want to update the JS here https://github.com/OCA/maintainer-tools/tree/master/template/module/static/src/js and add a special README/reference on recommended ways to deal w/ JS. |
looks like we agree no? @yajo 👅 |
Yes! I was telling about this part: "we do not have that many lines in jscript in OCA". I feel we have a lot of them! Only that! 😉
Let me refresh your memory: 😋 OCA/maintainer-tools#383 (comment) |
Ouch, that hurts! IE11 still... OK, then it will be Odoo 14 when we will be able to standardize JS guidelines. |
Information about the standards allowed in v13.0:~
Since Odoo 13.0 ES6 is supported: https://www.odoo.com/documentation/13.0/administration/install/deploy.html#supported-browsers |
Hello guys, would like you to help me how to use datatable on odoo, please |
Set ecmaVersion 2020 Avoid error Parsing error: Unexpected token > More info: - OCA/odoo-community.org#37 (comment)
Set ecmaVersion 2020 Avoid error Parsing error: Unexpected token > More info: - OCA/odoo-community.org#37 (comment)
where addond directory im my repo psae-droob-of-continent-1 |
Current guidelines are scarce: https://www.odoo.com/documentation/11.0/reference/guidelines.html#javascript-coding-guidelines
What do you think about using Javascript Standard or Semi-Standard Style?
More Info: https://standardjs.com/
The text was updated successfully, but these errors were encountered: