* JavaScript Programming
* Software Linter
seting
up.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
then close terminal and open new session:
run the commands:
nvm install 12.11
nvm alias default 12.11
node -v
npm -v
* install Jest:
npm install --save-dev jest
* install Babel:
npm install --save-dev @babel/core @babel/preset-env babel-jest
Create Babel Configurations:
Filename: .babelrc
# Note : should be in your root of project and specify the preset:
{
"presets": ["@babel/preset-env"]
}
* install Eslint:
npm install --save-dev eslint
Initialixe ESLint Configuration:
npx eslint --init
---
#NOTE this creates the Package.json.
---
Add Scripts to Package.json:
"scripts": {
"test": "jest",
"lint": "eslint ."
}
After setting up your project you now can now write tests using Jest, transpile your code using Babel, and lint your code using ESLint.