Skip to content

Commit

Permalink
Setup eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
lukePeavey committed Jun 14, 2019
1 parent dbef6ad commit 53452aa
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.vscode
/.git
/data
node_smodules
11 changes: 11 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": ["eslint:recommended", "prettier"],
"parserOptions": {
"ecmaVersion": 9
},
"env": {
"node": true,
"browser": false
},
"rules": {}
}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

.vscode

# dependencies
/node_modules

# testing
/coverage

.eslintcache

# misc
.DS_Store
.env.local
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"license": "MIT",
"main": "src/server.js",
"scripts": {
"start": "node src/server.js"
"start": "node src/server.js",
"lint": "yarn run eslint . --cache --color && echo \"eslint: no lint errors\""
},
"lint-staged": {
"{src,data}/**/*.{js,css,json}": [
Expand Down
1 change: 1 addition & 0 deletions src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ app.get('/random', function(req, res) {
})

var listener = app.listen(config.PORT, function() {
/* eslint-disable-next-line no-console */
console.log('Your app is listening on port ' + listener.address().port)
})

0 comments on commit 53452aa

Please sign in to comment.