Skip to content

Instantly share code, notes, and snippets.

@phvictorino
Last active April 26, 2019 00:26
Show Gist options
  • Select an option

  • Save phvictorino/bf736f55371800881a4fa343cf10201a to your computer and use it in GitHub Desktop.

Select an option

Save phvictorino/bf736f55371800881a4fa343cf10201a to your computer and use it in GitHub Desktop.
babel and eslint api
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
]
],
}
{
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module"
},
"env": {
"node": true,
"es6": true
},
"extends": [
"plugin:prettier/recommended",
"eslint:recommended"
],
"rules": {
"no-console": "warn",
"no-underscore-dangle": [1, { "allow": ["_id"] }],
"prettier/prettier": "error"
}
}
npm install --save-dev @babel/cli @babel/core @babel/node @babel/polyfill @babel/preset-env babel-eslint eslint eslint-config-prettier eslint-plugin-babel eslint-plugin-import eslint-plugin-prettier prettier nodemon
"scripts": {
"dev": "nodemon --exec babel-node src/index.js"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment