Skip to content

Commit

Permalink
add code linting with eslint #8
Browse files Browse the repository at this point in the history
  • Loading branch information
lourou committed Apr 22, 2018
1 parent a043d6c commit 52f564b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
]
}
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ This is a tool to display past and future retreats and create an online booking

# Using it
Use `npm install` to install dependancies. Then use `npm start` to launch it. Next go to http://localhost:3000.

# Test code linting
Use `npm run pretest` to test project with ESLint
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"private": true,
"scripts": {
"start": "nodemon ./bin/www",
"web": "node ./bin/www"
"web": "node ./bin/www",
"pretest": "eslint --ignore-path .gitignore ."
},
"engines": {
"node": ">=8.0"
Expand All @@ -31,6 +32,7 @@
"stripe": "^4.17.1"
},
"devDependencies": {
"eslint": "^4.19.1",
"nodemon": "1.17.3"
}
}
}

0 comments on commit 52f564b

Please sign in to comment.