Skip to content

Commit

Permalink
Add eslint and give it airbnb configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
hagopj13 committed Oct 25, 2019
1 parent a3780b1 commit b87730d
Show file tree
Hide file tree
Showing 6 changed files with 617 additions and 11 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
13 changes: 13 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"env": {
"node": true
},
"extends": [
"airbnb-base"
],
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
}
}
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@
},
"scripts": {
"start": "node src/index.js",
"dev": "nodemon src/index.js"
"dev": "nodemon src/index.js",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"dependencies": {
"express": "^4.17.1"
},
"devDependencies": {
"eslint": "^6.6.0",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2",
"nodemon": "^1.19.4"
}
}
4 changes: 2 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const express = require('express');

const app = new express();
const app = express();
app.use('/', (req, res) => {
res.send("Working");
res.send('Working');
});

module.exports = app;
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const app = require("./app");
const app = require('./app');

const port = 3000;
app.listen(port, () => {
Expand Down
Loading

0 comments on commit b87730d

Please sign in to comment.