ES5 <=> ES6 Conversion Tool

Asked 2 years ago, Updated 2 years ago, 102 views

http://js2.coffee/

This tool is a JavaScript<=>CoffeScript cross-conversion tool. Is there anything that can be converted to JavaScript<=>ES6 in the same way?

The goal is to efficiently replace the existing JS code with ES6.

ES6 will pass the syntax of JS(ES5), but
I am asking you this question because I wish there was a tool that would help me write more like ES6.

Thank you for your cooperation.

javascript ecmascript-6

2022-09-30 14:49

2 Answers

The tool to convert ES6 to JavaScript running on the current browser is a standard transpirer such as Babel.

In the reverse direction (renew JavaScript to modern), I went through and found Lebab.


2022-09-30 14:49

Using ESLint's automatic correction function is another way.
no-var, prefer-const, prefer-arrow-callback, http://eslint.org/docs/rules/object-shorthand"reff="reff="reff ""reffoll"reffow"reff ,"reff ""now"reff re"reffl"reffer-ar"reffer-callback"reff a"refferf"There are rules such as oreferrer">object-shorthand that automatically correct the code for ES5 to ES2015(ES6).

Note: ES6 rule list, ESLint's first step


2022-09-30 14:49

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.