Replies: 4 comments
-
Good idea. I think that some of this information (e.g. use class instead of object, etc.) should be added in a to be created 'developer guide' (maybe in the wiki or in the docs folder? and pointed into the CONTRIBUTING.md file). |
Beta Was this translation helpful? Give feedback.
-
Thanks for creating this issue ! This can be a good first contribution for anyone wanting to contribute to iTowns. @jailln yes, in fact the |
Beta Was this translation helpful? Give feedback.
-
@zarov yep, I'll start a draft in a new PR with propositions that came up while starting contributing to iTowns. |
Beta Was this translation helpful? Give feedback.
-
We need to define what rule we should make mandatory (in the ESLint config). |
Beta Was this translation helpful? Give feedback.
-
Ecma script 6 in itowns
ITowns is written in ES6 and uses almost all its new features. (See all features).
ITowns is transpiled in ES5 with Babel.
Important code rules, that aren't completely applied:
Class
instead of object.Set
andMap
instead ofArray
, when relevant.Little used features, don't forget them :
Ecma script 2016 in itowns see #932
exponentiation operator (**)
.Array.prototype.includes
.Ecma script 2017
async/await
. (Used in tests)Ecma script 2018
rest/spread properties
.Promise.prototype.finally()
.Ecma script 2019
What's new in Ecma script 2019
Array.Flat()
Object.fromEntries()
Array.flatMap()
String.trimStart() & String.trimEnd()
Ecma script 2020
What's new in Ecma script 2020
BigInt
and arbitrary precision integersmatchAll()
method for regular expressionsglobalThis
objectPromise.allSettled()
methodEcma script 2021
What's new in Ecma script 2021
string.replaceAll
methodPromise.any()
Ecma script 2022
What's new in Ecma script 2022
Array.at()
Function for IndexingObject.prototype.hasOwnProperty()
Beta Was this translation helpful? Give feedback.
All reactions