Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/foysalbn/node-initial-setup

This is my common Node js project setup with eslint airbnb
https://github.com/foysalbn/node-initial-setup

Last synced: 29 days ago
JSON representation

This is my common Node js project setup with eslint airbnb

Awesome Lists containing this project

README

        

# Node-initial-setup
This is my common Node js project setup with eslint airbnb

#### lintin setup
Add this script in `packege.json`
```
"lint" : "yarn add -D eslint prettier && npx install-peerdeps --dev eslint-config-airbnb-base && yarn add -D eslint-config-prettier eslint-plugin-prettier"
```
`note: need to reload vsCode window `

#### setting.json
```
// config related to code formatting
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"[javascript]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": null
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": true
},
"eslint.alwaysShowStatus": true
```

`.eslintrc.json`
```
{
"extends": ["prettier", "airbnb-base"],
"parserOptions": {
"ecmaVersion": 12
},
"env": {
"commonjs": true,
"node": true
},
"rules": {
"no-console": 0,
"indent": 0,
"linebreak-style": 0,
"prettier/prettier": [
"error",
{
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 4,
"semi": true
}
]
},
"plugins": ["prettier"]
}
```