1. babel-plugin-check-es2015-constants
Compile ES2015 constants to ES5
babel-plugin-check-es2015-constants
Package: babel-plugin-check-es2015-constants
Created by: babel
Last modified: Mon, 13 Jun 2022 04:00:42 GMT
Version: 6.22.0
License: MIT
Downloads: 5,973,286
Repository: https://github.com/babel/babel/tree/master/packages/babel-plugin-check-es2015-constants

Install

npm install babel-plugin-check-es2015-constants
yarn add babel-plugin-check-es2015-constants

babel-plugin-check-es2015-constants

Validate ES2015 constants

Installation

 $ npm install babel-plugin-check-es2015-constants

Usage

Via .babelrc (Recommended)

.babelrc

 {
  "plugins": ["check-es2015-constants"]
}

Via CLI

 $ babel --plugins check-es2015-constants script.js

Via Node API

 require("babel-core").transform("code", {
  plugins: ["check-es2015-constants"]
});

Note

This check will only validate consts. If you need it to compile down to var then you must also install and enable check-es2015-block-scoping.

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code