diff --git a/frontend/.eslintrc.json b/frontend/.eslintrc.json new file mode 100644 index 0000000..9f3d754 --- /dev/null +++ b/frontend/.eslintrc.json @@ -0,0 +1,44 @@ +{ + "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"], + "plugins": ["@typescript-eslint", "named-import-spacing"], + "ignorePatterns": ["vite-env.d.ts"], + "parser": "@typescript-eslint/parser", + "root": true, + "env": { + "browser": true, + "node": true + }, + "rules": { + "prefer-spread": "warn", + "prefer-const": "warn", + "semi": ["error", "never"], + "comma-spacing": 2, + "comma-style": 2, + "comma-dangle": ["error", "never"], + "no-console": "off", + "no-useless-escape": "off", + "no-unused-vars": "off", + "no-undef": "off", + "no-var-requires": "off", + "no-unreachable": ["error"], + "no-unexpected-multiline": ["error"], + "no-constant-condition": "off", + "no-inner-declarations": "off", + "no-self-compare": "error", + "@typescript-eslint/no-this-alias": "off", + "@typescript-eslint/consistent-type-imports": "warn", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/ban-ts-comment": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-unused-vars": ["warn", { + "args": "all", + "argsIgnorePattern": "^_", + "caughtErrors": "all", + "caughtErrorsIgnorePattern": "^_", + "destructuredArrayIgnorePattern": "^_", + "varsIgnorePattern": "^_", + "ignoreRestSiblings": true + }], + "named-import-spacing/named-import-spacing": 2 + } +} \ No newline at end of file diff --git a/frontend/bun.lockb b/frontend/bun.lockb index 527eb3a..a8cc3c4 100644 Binary files a/frontend/bun.lockb and b/frontend/bun.lockb differ diff --git a/frontend/package.json b/frontend/package.json index 090a0af..c731301 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,7 +10,8 @@ "dev": "bunx vite", "build": "bun run copy-themes && bunx vite build", "typecheck": "bunx vue-tsc --noEmit", - "ci": "bun i && bun run typecheck" + "ci": "bun i && bun run typecheck", + "lint": "bunx eslint ./src" }, "dependencies": { "@mdi/font": "^7.4.47", @@ -31,7 +32,11 @@ "rimraf": "latest", "typescript": "latest", "vite": "latest", - "vue-tsc": "latest" + "vue-tsc": "latest", + "@typescript-eslint/eslint-plugin": "^6.7.5", + "@typescript-eslint/parser": "^6.7.5", + "eslint": "^8.49.0", + "eslint-plugin-named-import-spacing": "^1.0.3" }, "optionalDependencies": { "@rollup/rollup-linux-x64-gnu": "4.9.5" diff --git a/frontend/src/components/selected-game/ConfigEditorOverlay.vue b/frontend/src/components/selected-game/ConfigEditorOverlay.vue index f3f8324..0ea363b 100644 --- a/frontend/src/components/selected-game/ConfigEditorOverlay.vue +++ b/frontend/src/components/selected-game/ConfigEditorOverlay.vue @@ -1,16 +1,16 @@