Skip to content

Commit

Permalink
Configure eslint to use prettier rules as well
Browse files Browse the repository at this point in the history
  • Loading branch information
hagopj13 committed Oct 25, 2019
1 parent b87730d commit 403e943
Show file tree
Hide file tree
Showing 5 changed files with 431 additions and 17 deletions.
21 changes: 9 additions & 12 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"env": {
"node": true
},
"extends": [
"airbnb-base"
],
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
}
}
"env": {
"node": true
},
"extends": ["airbnb-base", "plugin:prettier/recommended"],
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {}
}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"printWidth": 125,
"endOfLine": "lf"
}
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,20 @@
"start": "node src/index.js",
"dev": "nodemon src/index.js",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
"lint:fix": "eslint . --fix",
"prettier": "prettier --check **/*.js",
"prettier:fix": "prettier --write **/*.js"
},
"dependencies": {
"express": "^4.17.1"
},
"devDependencies": {
"eslint": "^6.6.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-prettier": "^6.4.0",
"eslint-plugin-import": "^2.18.2",
"nodemon": "^1.19.4"
"eslint-plugin-prettier": "^3.1.1",
"nodemon": "^1.19.4",
"prettier": "^1.18.2"
}
}
Loading

0 comments on commit 403e943

Please sign in to comment.