funny eslint

what i find funny is i already fucked up and ive only made a boilerplate
This commit is contained in:
oat 2020-09-02 16:17:26 +03:00
parent dec7600b92
commit 587207f99e
Signed by: oat
GPG key ID: DD83A9617A252385
6 changed files with 1286 additions and 6 deletions

1
.eslintignore Normal file
View file

@ -0,0 +1 @@
**/*.js

37
.eslintrc.json Normal file
View 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

File diff suppressed because it is too large Load diff

View file

@ -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"
}
}

View file

@ -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`;
}