Skip to content

Commit

Permalink
feat: Add i18n + misc features
Browse files Browse the repository at this point in the history
- i18n with i18next
- migration to flat eslint config
- deps upgrade
- remove customClient in favor of extended default client
- display all cards no matter how many duplicates there are
  • Loading branch information
GeekCornerGH committed Jan 17, 2025
1 parent 6bf4df2 commit e049013
Show file tree
Hide file tree
Showing 100 changed files with 7,355 additions and 6,099 deletions.
61 changes: 0 additions & 61 deletions .eslintrc.json

This file was deleted.

84 changes: 84 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
import eslint from "@eslint/js";
import globals from "globals";
import tseslint from "@typescript-eslint/eslint-plugin";
import tseslintParser from "@typescript-eslint/parser";
import unusedImports from "eslint-plugin-unused-imports";
import simpleImportSort from "eslint-plugin-simple-import-sort";

export default [
{
ignores: ["dist/**", "node_modules/**"],
},
eslint.configs.recommended,
{
files: ["**/*.ts"],
plugins: {
"@typescript-eslint": tseslint,
"unused-imports": unusedImports,
"simple-import-sort": simpleImportSort,
},
languageOptions: {
globals: {
...globals.node
},
parser: tseslintParser,
},
rules: {
"quotes": ["error", "double", { "avoidEscape": true }],
"jsx-quotes": ["error", "prefer-double"],
"no-mixed-spaces-and-tabs": "error",
"indent": ["error", 4, { "SwitchCase": 1 }],
"arrow-parens": ["error", "as-needed"],
"eol-last": ["error", "always"],
"func-call-spacing": ["error", "never"],
"no-multi-spaces": "error",
"no-trailing-spaces": "error",
"no-whitespace-before-property": "error",
"semi": ["error", "always"],
"space-in-parens": ["error", "never"],
"block-spacing": ["error", "always"],
"object-curly-spacing": ["error", "always"],
"eqeqeq": ["error", "always", { "null": "ignore" }],
"spaced-comment": ["error", "always", { "markers": ["!"] }],
"yoda": "error",
"no-undef": "off",
"prefer-destructuring": ["error", { "object": true, "array": false }],
"operator-assignment": ["error", "always"],
"no-useless-computed-key": "error",
"no-unneeded-ternary": ["error", { "defaultAssignment": false }],
"no-invalid-regexp": "error",
"no-constant-condition": ["error", { "checkLoops": false }],
"no-duplicate-imports": "error",
"no-extra-semi": "error",
"dot-notation": "error",
"no-useless-escape": "error",
"no-fallthrough": "error",
"for-direction": "error",
"no-async-promise-executor": "error",
"no-cond-assign": "error",
"no-dupe-else-if": "error",
"no-duplicate-case": "error",
"no-irregular-whitespace": "error",
"no-loss-of-precision": "error",
"no-misleading-character-class": "error",
"no-prototype-builtins": "error",
"no-regex-spaces": "error",
"no-shadow-restricted-names": "error",
"no-unexpected-multiline": "error",
"no-unsafe-optional-chaining": "error",
"no-useless-backreference": "error",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"no-unused-vars": "error",
"use-isnan": "error",
"prefer-const": "error",
"prefer-spread": "error",
"linebreak-style": ["error", "unix"],

"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",

"unused-imports/no-unused-imports": "error"
},
},
];
28 changes: 15 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"main": "dist/index.js",
"scripts": {
"lint": "eslint . --ext .ts",
"lint": "eslint",
"build": "tsc -b",
"start": "node .",
"start:restart": "forever start . --watchDirectory dist",
Expand All @@ -16,25 +16,27 @@
"author": "",
"license": "AGPL-3.0-only",
"dependencies": {
"discord.js": "^14.14.1",
"dotenv": "^16.4.5",
"discord.js": "^14.17.3",
"dotenv": "^16.4.7",
"forever": "^4.0.3",
"sequelize": "^6.37.3",
"i18next": "^24.2.1",
"sequelize": "^6.37.5",
"sqlite3": "^5.1.7",
"toml": "^3.0.0"
},
"devDependencies": {
"@types/node": "^20.12.7",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"eslint": "^8.57.0",
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-unused-imports": "^3.1.0",
"tsx": "^4.7.2",
"typescript": "^5.4.5"
"@types/node": "^22.10.7",
"@typescript-eslint/eslint-plugin": "^8.20.0",
"@typescript-eslint/parser": "^8.20.0",
"eslint": "^9.18.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "^4.1.4",
"globals": "^15.14.0",
"tsx": "^4.19.2",
"typescript": "^5.7.3"
},
"type": "module",
"nodemonConfig": {
"ignore": "./database/**"
}
}
}
Loading

0 comments on commit e049013

Please sign in to comment.