Add eslint and fix issues

This commit is contained in:
Chord 2020-01-12 08:19:39 +01:00
parent 5be2397fe5
commit 18072ad62f
3 changed files with 20 additions and 1 deletions

19
.eslintrc.cjs Normal file
View file

@ -0,0 +1,19 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"rules": {
"no-unused-vars" : "off",
}
};

View file

@ -1,7 +1,6 @@
import fs from 'fs' import fs from 'fs'
import express from 'express' import express from 'express'
import bodyParser from 'body-parser' import bodyParser from 'body-parser'
import * as db from './db.js'
import api_auth from './authentication.js' import api_auth from './authentication.js'
import api_user from './user.js' import api_user from './user.js'
import api_info from './info.js' import api_info from './info.js'

View file

@ -39,6 +39,7 @@
"bootstrap": "^4.4.1", "bootstrap": "^4.4.1",
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"css-loader": "^2.1.1", "css-loader": "^2.1.1",
"eslint": "^6.8.0",
"jquery": "^3.4.1", "jquery": "^3.4.1",
"mini-css-extract-plugin": "^0.6.0", "mini-css-extract-plugin": "^0.6.0",
"moment": "^2.24.0", "moment": "^2.24.0",