diff --git a/eslint.config.mjs b/eslint.config.mjs index 469ca94..9287416 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -16,77 +16,87 @@ const compat = new FlatCompat({ allConfig: js.configs.all }) -export default [{ - ignores: ["**/node_modules", "**/dist"], -}, ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"), { - plugins: { - "@typescript-eslint": typescriptEslint, +export default [ + { + ignores: ["**/node_modules", "**/dist"] }, - - languageOptions: { - globals: { - ...globals.node, - ...globals.browser, + ...compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"), + { + plugins: { + "@typescript-eslint": typescriptEslint, }, - parser: tsParser, - ecmaVersion: "latest", - sourceType: "module", - }, + languageOptions: { + globals: { + ...globals.node, + ...globals.browser, + }, - rules: { - indent: ["error", 4, { - SwitchCase: 1, - }], - - "linebreak-style": ["error", "unix"], - quotes: ["warn", "double"], - semi: ["error", "never"], - "no-unused-vars": "off", - "prefer-const": "warn", - "no-var": "error", - - "no-multiple-empty-lines": ["error", { - max: 2, - maxEOF: 1, - maxBOF: 0, - }], - - "no-lonely-if": "error", - "no-empty-function": "error", - "no-inline-comments": "error", - "no-trailing-spaces": ["error"], - - "arrow-spacing": ["warn", { - before: true, - after: true, - }], - - "space-before-function-paren": ["error", { - anonymous: "never", - named: "never", - asyncArrow: "always", - }], - - "comma-spacing": "error", - "@typescript-eslint/no-var-requires": "off", - "@typescript-eslint/no-explicit-any": "off", - - "@typescript-eslint/no-unused-vars": ["warn", { - vars: "all", - args: "after-used", - ignoreRestSiblings: false, - }], - "@typescript-eslint/no-empty-object-type": "off", - "@typescript-eslint/no-require-imports": "off", - }, -}, { - languageOptions: { - globals: { - ...globals.node, + parser: tsParser, + ecmaVersion: "latest", + sourceType: "module", }, - ecmaVersion: 5, - sourceType: "commonjs", - }, -}] \ No newline at end of file + rules: { + indent: ["error", 4, { + SwitchCase: 1, + }], + + "linebreak-style": ["error", "unix"], + quotes: ["warn", "double"], + semi: ["error", "never"], + "no-unused-vars": "off", + "prefer-const": "warn", + "no-var": "error", + + "no-multiple-empty-lines": ["error", { + max: 2, + maxEOF: 1, + maxBOF: 0, + }], + + "no-lonely-if": "error", + "no-empty-function": "error", + "no-inline-comments": "error", + "no-trailing-spaces": ["error"], + + "arrow-spacing": ["warn", { + before: true, + after: true, + }], + + "space-before-function-paren": ["error", { + anonymous: "never", + named: "never", + asyncArrow: "always", + }], + + "comma-spacing": "error", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-explicit-any": "off", + + "@typescript-eslint/no-unused-vars": ["warn", { + vars: "all", + args: "after-used", + ignoreRestSiblings: false, + }], + "@typescript-eslint/no-empty-object-type": "off", + "@typescript-eslint/no-require-imports": "off", + "@typescript-eslint/ban-ts-comment": ["error", { + "ts-expect-error": "allow-with-description", + "ts-ignore": "allow-with-description", + "ts-nocheck": "allow-with-description", + "ts-check": "allow-with-description", + }], + }, + }, { + languageOptions: { + globals: { + ...globals.node, + }, + + ecmaVersion: 5, + sourceType: "commonjs", + }, + } +] diff --git a/package.json b/package.json index adb1a36..fb37f9a 100644 --- a/package.json +++ b/package.json @@ -1,70 +1,70 @@ { - "name": "illegitimate-bot", - "displayName": "Illegitimate Bot", - "version": "1.0.0", - "description": "", - "main": "src/index.ts", - "type": "module", - "repository": { - "type": "git", - "url": "https://gitlab.com/illegitimate/illegitimate-bot" - }, - "homepage": "https://gitlab.com/illegitimate/illegitimate-bot", - "scripts": { - "start": "node dist/index.js", - "build": "swc src -d dist --strip-leading-paths", - "watch": "swc src -d dist --strip-leading-paths --watch", - "dev": "nodemon --config nodemon-swc.json", - "dev:conc": "conc --names \"SWC,BOT\" --prefix-colors \"blue, magenta\" \"yarn watch\" \"yarn dev:js\"", - "dev:ts": "nodemon --config nodemon.json src/index.ts", - "dev:js": "nodemon --config nodemon-js.json dist/index.js", - "check": "tsc --noEmit", - "lint": "eslint", - "lint:fix": "eslint --fix", - "push:prod": "cross-env NODE_PATH=src/ \"ts-node scripts/deploy-commands.ts\"", - "push:dev": "cross-env NODE_PATH=src/ \"ts-node scripts/dev-deploy.ts\"", - "delete:dev": "ts-node scripts/delete-commands.ts" - }, - "author": "Taken", - "license": "GPL-3.0-only", - "dependencies": { - "@discord-player/extractor": "^4.5.1", - "@evan/opus": "^1.0.3", - "anilist": "^0.12.4", - "axios": "^1.7.5", - "chalk": "^5.3.0", - "cron": "^3.1.7", - "discord-player": "^6.7.1", - "discord-player-youtubei": "^1.2.6", - "discord.js": "^14.15.3", - "dotenv": "^16.4.5", - "ioredis": "^5.4.1", - "mongoose": "^8.5.3", - "ms": "^2.1.3", - "pg": "^8.12.0", - "pg-hstore": "^2.3.4", - "pretty-ms": "^9.1.0", - "sequelize": "^6.37.3", - "youtube-ext": "^1.1.25" - }, - "devDependencies": { - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "^9.9.0", - "@swc/cli": "^0.4.0", - "@swc/core": "^1.7.14", - "@types/ms": "^0.7.34", - "@types/node": "^22.5.0", - "@types/pg": "^8", - "@typescript-eslint/eslint-plugin": "^8.2.0", - "@typescript-eslint/parser": "^8.2.0", - "chokidar": "^3.6.0", - "concurrently": "^8.2.2", - "cross-env": "^7.0.3", - "eslint": "^9.9.0", - "globals": "^15.9.0", - "sqlite3": "^5.1.7", - "ts-node": "^10.9.2", - "typescript": "^5.5.4" - }, - "packageManager": "yarn@4.4.0" + "name": "illegitimate-bot", + "displayName": "Illegitimate Bot", + "version": "1.0.0", + "description": "", + "main": "src/index.ts", + "type": "module", + "repository": { + "type": "git", + "url": "https://gitlab.com/illegitimate/illegitimate-bot" + }, + "homepage": "https://gitlab.com/illegitimate/illegitimate-bot", + "scripts": { + "start": "node dist/index.js", + "build": "swc src -d dist --strip-leading-paths", + "watch": "swc src -d dist --strip-leading-paths --watch", + "dev": "nodemon --config nodemon-swc.json", + "dev:conc": "conc --names \"SWC,BOT\" --prefix-colors \"blue, magenta\" \"yarn watch\" \"yarn dev:js\"", + "dev:ts": "nodemon --config nodemon.json src/index.ts", + "dev:js": "nodemon --config nodemon-js.json dist/index.js", + "check": "tsc --noEmit", + "lint": "eslint", + "lint:fix": "eslint --fix", + "push:prod": "cross-env NODE_PATH=src/ \"ts-node scripts/deploy-commands.ts\"", + "push:dev": "cross-env NODE_PATH=src/ \"ts-node scripts/dev-deploy.ts\"", + "delete:dev": "ts-node scripts/delete-commands.ts" + }, + "author": "Taken", + "license": "GPL-3.0-only", + "dependencies": { + "@discord-player/extractor": "^4.5.1", + "@evan/opus": "^1.0.3", + "anilist": "^0.12.4", + "axios": "^1.7.5", + "chalk": "^5.3.0", + "cron": "^3.1.7", + "discord-player": "^6.7.1", + "discord-player-youtubei": "^1.2.6", + "discord.js": "^14.15.3", + "dotenv": "^16.4.5", + "ioredis": "^5.4.1", + "mongoose": "^8.5.3", + "ms": "^2.1.3", + "pg": "^8.12.0", + "pg-hstore": "^2.3.4", + "pretty-ms": "^9.1.0", + "sequelize": "^6.37.3", + "youtube-ext": "^1.1.25" + }, + "devDependencies": { + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "^9.9.0", + "@swc/cli": "^0.4.0", + "@swc/core": "^1.7.14", + "@types/ms": "^0.7.34", + "@types/node": "^22.5.0", + "@types/pg": "^8", + "@typescript-eslint/eslint-plugin": "^8.2.0", + "@typescript-eslint/parser": "^8.2.0", + "chokidar": "^3.6.0", + "concurrently": "^8.2.2", + "cross-env": "^7.0.3", + "eslint": "^9.9.0", + "globals": "^15.9.0", + "sqlite3": "^5.1.7", + "ts-node": "^10.9.2", + "typescript": "^5.5.4" + }, + "packageManager": "yarn@4.4.0" }