Skip to content
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

Declarative system eslint rules should allow the library to be written in JavaScript ES6 #573

Open
kennsippell opened this issue Oct 2, 2023 · 1 comment
Labels
Type: Improvement Make something better Type: Technical issue Improve something that users won't notice

Comments

@kennsippell
Copy link
Member

What feature do you want to improve?
The code in src/nools has eslint rule requiring ecmaVersion: 5.
It'd be super nice to work in ES6 and support features like const, destructuring, spread, etc.
ES6 is supported after Chrome 51. XWalk android container was Chrome 54.

I'm unclear why the code in this folder is special cased. I suspect it was something back in CHT 2.x days? Or pre-XWalk users used the Chrome WebView and could have had Chrome <51.

Describe the improvement you'd like
Relax the eslint rule to require ES6.

Additional context
I'm unclear if this would be called a "breaking change"?

@kennsippell kennsippell added the Type: Improvement Make something better label Oct 2, 2023
@kennsippell kennsippell changed the title Declarative system should allow code to be written in JavaScript ES6 Declarative system eslint rules should allow the library to be written in JavaScript ES6 Oct 2, 2023
@kennsippell kennsippell added the Type: Technical issue Improve something that users won't notice label Oct 2, 2023
@garethbowen
Copy link
Member

I'm unclear why the code in this folder is special cased.

Isn't it because this code is executed in the browser, unlike the rest which is only executed on command line? We can be much more aggressive with backwards compatibility for app dev CLI than CHW browsers. I think it would be a better design to bundle this code into the cht-core webapp behind some API so it can comply with the cht-cores browser support rather than cht-confs.

I think es6 would be safe though, as you say, even xwalk supported it (almost) completely. So +1 from me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Improvement Make something better Type: Technical issue Improve something that users won't notice
Projects
None yet
Development

No branches or pull requests

2 participants