diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index ca612f4..109a998 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -2,7 +2,7 @@ name: Docker Image CI on: push: - branches: ["*"] + branches: ['*'] env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..6cc0e70 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +repos: + # - repo: https://github.com/pre-commit/mirrors-eslint + # rev: v9.5.0 # Use the version of ESLint you need + # hooks: + # - id: eslint + # additional_dependencies: + # - "@typescript-eslint/eslint-plugin@latest" + # - "@typescript-eslint/parser@latest" + + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v4.0.0-alpha.8 # Use the version of Prettier you need + hooks: + - id: prettier + additional_dependencies: [] diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..5c5248c --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,58 @@ +import typescriptEslint from '@typescript-eslint/eslint-plugin' +import globals from 'globals' +import parser from 'vue-eslint-parser' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import js from '@eslint/js' +import { FlatCompat } from '@eslint/eslintrc' + +const __filename = fileURLToPath(import.meta.url) +const __dirname = path.dirname(__filename) +const compat = new FlatCompat({ + baseDirectory: __dirname, + recommendedConfig: js.configs.recommended, + allConfig: js.configs.all, +}) + +export default [ + ...compat.extends( + 'plugin:vue/vue3-recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:@typescript-eslint/recommended-requiring-type-checking', + 'eslint:recommended', + ), + { + plugins: { + '@typescript-eslint': typescriptEslint, + }, + + languageOptions: { + globals: { + ...globals.node, + }, + + parser: parser, + ecmaVersion: 'latest', + sourceType: 'commonjs', + + parserOptions: { + parser: '@typescript-eslint/parser', + sourceType: 'module', + project: './tsconfig.json', // Ensure this points to your tsconfig.json file + }, + }, + + rules: { + 'no-unused-vars': 'off', + + '@typescript-eslint/no-unused-vars': [ + 'error', + { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + caughtErrorsIgnorePattern: '^_', + }, + ], + }, + }, +] diff --git a/index.html b/index.html index 10b9404..7d92d43 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - +
diff --git a/package.json b/package.json index 37a931b..23ac103 100644 --- a/package.json +++ b/package.json @@ -21,14 +21,14 @@ "vue3-shortkey": "^4.0.0" }, "devDependencies": { - "@typescript-eslint/eslint-plugin": "^6.19.0", - "@typescript-eslint/parser": "^6.19.0", + "@typescript-eslint/eslint-plugin": "^7.13.1", + "@typescript-eslint/parser": "^7.13.1", "@vitejs/plugin-vue": "^5.0.0", "eslint": "^8.56.0", "eslint-plugin-vue": "^9.20.1", "eslint-scope": "^8.0.0", "sass": "^1.69.7", - "typescript": "^5.3.3", + "typescript": "^5.5.2", "vite": "^5.0.13", "vue-eslint-parser": "^9.4.0" }, diff --git a/src/components/referee/LogoAndActions.vue b/src/components/referee/LogoAndActions.vue index 5d0f16a..0b4296f 100644 --- a/src/components/referee/LogoAndActions.vue +++ b/src/components/referee/LogoAndActions.vue @@ -6,8 +6,10 @@