From d83a8763ffabe0566e50b73a7015269109291c51 Mon Sep 17 00:00:00 2001 From: Michel Bade Date: Thu, 29 Aug 2024 21:26:18 +0200 Subject: [PATCH] BRAIN-39 - Slimed eslint config and it's deps --- .eslintrc.js => .eslintrc.cjs | 23 +++++++++-------------- assets/runtime.d.ts | 2 ++ tsconfig.json | 3 +-- 3 files changed, 12 insertions(+), 16 deletions(-) rename .eslintrc.js => .eslintrc.cjs (92%) diff --git a/.eslintrc.js b/.eslintrc.cjs similarity index 92% rename from .eslintrc.js rename to .eslintrc.cjs index c57990b..9a978f2 100644 --- a/.eslintrc.js +++ b/.eslintrc.cjs @@ -1,22 +1,17 @@ /* eslint-env node */ +require('@rushstack/eslint-patch/modern-module-resolution') + module.exports = { root: true, - plugins: ['vue', '@typescript-eslint'], - parser: 'vue-eslint-parser', - parserOptions: { - parser: '@typescript-eslint/parser', - sourceType: 'module', - project: './tsconfig.json', - extraFileExtensions: ['.vue'], - }, - env: { - browser: true, - }, extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended-type-checked', 'plugin:vue/vue3-recommended', + 'eslint:recommended', + '@vue/eslint-config-typescript' ], + parserOptions: { + ecmaVersion: 'latest' + }, + rules: { 'no-undef': 'off', curly: ['error', 'multi-or-nest', 'consistent'], @@ -103,4 +98,4 @@ module.exports = { }], /* vue rules */ }, -}; +} diff --git a/assets/runtime.d.ts b/assets/runtime.d.ts index 09c21bd..b88d2b2 100644 --- a/assets/runtime.d.ts +++ b/assets/runtime.d.ts @@ -1,11 +1,13 @@ import type { Api } from '@/service/api'; import type { Notify } from '@/service/notify'; import type { Filters } from '@/service/filters'; +import type { I18n } from '@/i18n'; declare module '@vue/runtime-core' { interface ComponentCustomProperties { $api: Api, $notify: Notify, $filters: Filters, + $t: I18n['global']['t'], } } diff --git a/tsconfig.json b/tsconfig.json index c4b615d..b3b15e8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -27,7 +27,6 @@ }, "include": [ "./assets/**/*.ts", - "./assets/**/*.vue", - "./.eslintrc.js" + "./assets/**/*.vue" ], }