From 6dd9cf70839ffb4fd8a91d9accda32861394c1fc Mon Sep 17 00:00:00 2001 From: KevinMidboe Date: Thu, 26 Oct 2017 14:51:12 +0200 Subject: [PATCH] Added eslint and set preset to airbnb base. --- seasoned_api/.eslintrc.json | 3 +++ seasoned_api/package.json | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 seasoned_api/.eslintrc.json diff --git a/seasoned_api/.eslintrc.json b/seasoned_api/.eslintrc.json new file mode 100644 index 0000000..6f67564 --- /dev/null +++ b/seasoned_api/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "airbnb-base" +} \ No newline at end of file diff --git a/seasoned_api/package.json b/seasoned_api/package.json index 74a5699..f65ac99 100644 --- a/seasoned_api/package.json +++ b/seasoned_api/package.json @@ -2,12 +2,14 @@ "name": "seasoned-api", "main": "webserver/server.js", "scripts": { - "start": "cross-env SEASONED_CONFIG=conf/development.json NODE_PATH=. node src/webserver/server.js" + "start": "cross-env SEASONED_CONFIG=conf/development.json NODE_PATH=. node src/webserver/server.js", + "lint": "./node_modules/.bin/eslint src/webserver/" }, "dependencies": { "bcrypt-nodejs": "^0.0.3", "body-parser": "~1.0.1", "cross-env": "^3.1.3", + "eslint": "^4.9.0", "express": "~4.0.0", "jsonwebtoken": "^8.0.1", "mongoose": "^3.6.13", @@ -19,5 +21,9 @@ "request-promise": "^4.2", "sqlite": "^2.2.1", "sqlite3": "^2.5.0" + }, + "devDependencies": { + "eslint-config-airbnb-base": "^12.1.0", + "eslint-plugin-import": "^2.8.0" } }