npm install -D \
eslint \
babel-eslint@next \
eslint-plugin-unicorn \
@hydre/eslint-config-hydre
Add to your .eslintrc.yml
file
env:
node: true
es2020: true
plugins:
- unicorn
extends:
- "@hydre/eslint-config-hydre"
globals:
Atomics: readonly
SharedArrayBuffer: readonly
# Nodejs support some experimental ecma features but not eslint
parser: babel-eslint
parserOptions:
sourceType: module
configFile: package.json
ecmaVersion: 11
we suggest using prettier-eslint-cli
"lint": "prettier-eslint $PWD/\"**/*.js\" --print-width 60 --list-different && eslint --color .",
"format": "prettier-eslint $PWD/\"**/*.js\" --print-width 60 --write",