Updated the dependencies

Added ESLint to the dependencies
Added a ESLint configuration
changed the transpilation target
This commit is contained in:
BlackDemonFire 2021-11-03 22:34:11 +01:00
parent a1f7aeffb5
commit c4a9495efd
Signed by: lucy
GPG key ID: 0BDEC32ADAA013EE
4 changed files with 4125 additions and 176 deletions

64
.eslintrc.json Normal file
View file

@ -0,0 +1,64 @@
{
"env": {
"node": true,
"commonjs": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 12,
"requireConfig": false
},
"rules": {
"indent": [
2,
4,
{
"SwitchCase": 1
}
],
"arrow-spacing": ["warn", { "before": true, "after": true }],
"brace-style": ["error", "1tbs", { "allowSingleLine": true }],
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": "error",
"comma-style": "error",
"curly": ["error", "multi-line", "consistent"],
"dot-location": ["error", "property"],
"handle-callback-err": "off",
"keyword-spacing": "error",
"max-nested-callbacks": ["error", { "max": 4 }],
"max-statements-per-line": ["error", { "max": 2 }],
"no-empty-function": "error",
"no-floating-decimal": "error",
"no-inline-comments": "error",
"no-lonely-if": "error",
"no-multi-spaces": "error",
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1, "maxBOF": 0 }],
"no-shadow": ["error", { "allow": ["err", "resolve", "reject"] }],
"no-trailing-spaces": ["error"],
"no-unused-vars":"error",
"no-var": "error",
"object-curly-spacing": ["error", "always"],
"prefer-const": "error",
"quotes": ["error", "double"],
"semi": ["error", "always"],
"space-before-blocks": "error",
"space-before-function-paren": ["error", {
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": "error",
"yoda": "error"
},
"root": true,
"parser": "@typescript-eslint/parser",
"settings": {
"import/parsers": [
".ts"
]
}
}

4216
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,18 +1,23 @@
{
"name": "untis-bot",
"version": "1.0.0",
"version": "2.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build": "npx tsc",
"update": "git pull",
"start": "node dist/index.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"@types/node": "^14.14.10",
"discord.js": "^12.5.1",
"@discordjs/builders": "^0.8.2",
"@types/node": "^14.17.32",
"@typescript-eslint/parser": "^5.3.0",
"discord.js": "^13.3.1",
"dotenv": "^8.2.0",
"enmap": "^5.8.2",
"webuntis": "^1.13.2"
"enmap": "^5.8.7",
"eslint": "^7.32.0",
"webuntis": "^1.15.4"
}
}

View file

@ -4,7 +4,7 @@
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */