Closed Tardo closed 4 years ago
I would be in favor but looks like a big leap for the OCA. To be said that we do not have that many lines in jscript in OCA.
@Yajo
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... :smirk:
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 https://github.com/OCA/maintainer-tools/issues/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! Surprised that Odoo 13 supports IE11 (https://html5test.com/compare/browser/ie-11/chrome-68/firefox-60/edge-18.html) :S but it's understandable (https://www.netmarketshare.com/browser-market-share.aspx)...
Odoo 13 is not going to support it officially AFAIK. Odoo 12 does.
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.
:+1: 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.
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
looks like we agree no? @Yajo :tongue:
looks like we agree no? @Yajo tongue
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! :wink:
Odoo 13 is not going to support it officially AFAIK. Odoo 12 does.
Let me refresh your memory: :yum: https://github.com/OCA/maintainer-tools/issues/383#issuecomment-430258444
Let me refresh your memory
Ouch, that hurts! IE11 still...
OK, then it will be Odoo 14 when we will be able to standardize JS guidelines.
https://github.com/odoo/odoo/pull/28457#issuecomment-470479608
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
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/