forked from oat/in-the-database-2
funny eslint
what i find funny is i already fucked up and ive only made a boilerplate
This commit is contained in:
parent
dec7600b92
commit
587207f99e
6 changed files with 1286 additions and 6 deletions
1
.eslintignore
Normal file
1
.eslintignore
Normal file
|
@ -0,0 +1 @@
|
|||
**/*.js
|
37
.eslintrc.json
Normal file
37
.eslintrc.json
Normal file
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"env": {
|
||||
"es6": true,
|
||||
"node": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended"
|
||||
],
|
||||
"globals": {
|
||||
"Atomics": "readonly",
|
||||
"SharedArrayBuffer": "readonly"
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2018,
|
||||
"sourceType": "module"
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint"
|
||||
],
|
||||
"rules": {
|
||||
"indent": [
|
||||
"warn",
|
||||
"tab"
|
||||
],
|
||||
"linebreak-style": "warn",
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
],
|
||||
"semi": [
|
||||
"error",
|
||||
"always"
|
||||
]
|
||||
}
|
||||
}
|
1237
package-lock.json
generated
1237
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -15,5 +15,10 @@
|
|||
"mongoose": "^5.10.2",
|
||||
"typescript": "^4.0.2",
|
||||
"winston": "^3.3.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^4.0.1",
|
||||
"@typescript-eslint/parser": "^4.0.1",
|
||||
"eslint": "^7.8.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,10 +8,10 @@ import * as format from './lib/format';
|
|||
const config = JSON.parse(fs.readFileSync('./config/config.json', {encoding: 'utf8'}));
|
||||
|
||||
const dbClient = mongoose.connect(`${config.dbconnectionURL}/${config.dbname}`, {
|
||||
useNewUrlParser: true, // idfk what any of this does i just copied an example
|
||||
useUnifiedTopology: true,
|
||||
useFindAndModify: false,
|
||||
useCreateIndex: true
|
||||
useNewUrlParser: true, // idfk what any of this does i just copied an example
|
||||
useUnifiedTopology: true,
|
||||
useFindAndModify: false,
|
||||
useCreateIndex: true
|
||||
});
|
||||
|
||||
const logger = winston.createLogger({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
export function formatTime(date: Date) : string {
|
||||
let hours = date.getUTCHours();
|
||||
let minutes = date.getUTCMinutes();
|
||||
const hours = date.getUTCHours();
|
||||
const minutes = date.getUTCMinutes();
|
||||
|
||||
return `${hours < 10 ? '0' : ''}${hours}:${minutes < 10 ? '0' : ''}${minutes} UTC`;
|
||||
}
|
Loading…
Reference in a new issue