|
|
@@ -1,73 +1,86 @@
|
|
|
-import vue from "eslint-plugin-vue";
|
|
|
-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";
|
|
|
+import vue from 'eslint-plugin-vue'
|
|
|
+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 __filename = fileURLToPath(import.meta.url)
|
|
|
+const __dirname = path.dirname(__filename)
|
|
|
const compat = new FlatCompat({
|
|
|
- baseDirectory: __dirname,
|
|
|
- recommendedConfig: js.configs.recommended,
|
|
|
- allConfig: js.configs.all
|
|
|
-});
|
|
|
+ baseDirectory: __dirname,
|
|
|
+ recommendedConfig: js.configs.recommended,
|
|
|
+ allConfig: js.configs.all,
|
|
|
+})
|
|
|
|
|
|
-export default [{
|
|
|
- ignores: ["**/.nuxt", "coverage/*", "vendor/*", "dist/*", "models/models.ts"],
|
|
|
-}, ...compat.extends(
|
|
|
- "@nuxtjs/eslint-config-typescript",
|
|
|
- "plugin:nuxt/recommended",
|
|
|
- "eslint:recommended",
|
|
|
- "plugin:@typescript-eslint/recommended",
|
|
|
- "plugin:vue/vue3-recommended",
|
|
|
- "plugin:prettier/recommended",
|
|
|
- "plugin:you-dont-need-lodash-underscore/compatible",
|
|
|
-), {
|
|
|
+export default [
|
|
|
+ {
|
|
|
+ ignores: [
|
|
|
+ '**/.nuxt',
|
|
|
+ 'coverage/*',
|
|
|
+ 'vendor/*',
|
|
|
+ 'dist/*',
|
|
|
+ 'models/models.ts',
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ...compat.extends(
|
|
|
+ '@nuxtjs/eslint-config-typescript',
|
|
|
+ 'plugin:nuxt/recommended',
|
|
|
+ 'eslint:recommended',
|
|
|
+ 'plugin:@typescript-eslint/recommended',
|
|
|
+ 'plugin:vue/vue3-recommended',
|
|
|
+ 'plugin:prettier/recommended',
|
|
|
+ 'plugin:you-dont-need-lodash-underscore/compatible',
|
|
|
+ ),
|
|
|
+ {
|
|
|
plugins: {
|
|
|
- vue,
|
|
|
- "@typescript-eslint": typescriptEslint,
|
|
|
+ vue,
|
|
|
+ '@typescript-eslint': typescriptEslint,
|
|
|
},
|
|
|
|
|
|
languageOptions: {
|
|
|
- globals: {
|
|
|
- ...globals.browser,
|
|
|
- ...globals.node,
|
|
|
- useRuntimeConfig: "readonly",
|
|
|
- useAsyncData: "readonly",
|
|
|
- navigateTo: "readonly",
|
|
|
- computed: "readonly",
|
|
|
- ref: "readonly",
|
|
|
- definePageMeta: "readonly",
|
|
|
- useRouter: "readonly",
|
|
|
- useRoute: "readonly",
|
|
|
- useI18n: "readonly",
|
|
|
- onMounted: "readonly",
|
|
|
- onUnmounted: "readonly",
|
|
|
- watch: "readonly",
|
|
|
- useRepo: "readonly",
|
|
|
- },
|
|
|
+ globals: {
|
|
|
+ ...globals.browser,
|
|
|
+ ...globals.node,
|
|
|
+ useRuntimeConfig: 'readonly',
|
|
|
+ useAsyncData: 'readonly',
|
|
|
+ navigateTo: 'readonly',
|
|
|
+ computed: 'readonly',
|
|
|
+ ref: 'readonly',
|
|
|
+ definePageMeta: 'readonly',
|
|
|
+ useRouter: 'readonly',
|
|
|
+ useRoute: 'readonly',
|
|
|
+ useI18n: 'readonly',
|
|
|
+ onMounted: 'readonly',
|
|
|
+ onUnmounted: 'readonly',
|
|
|
+ watch: 'readonly',
|
|
|
+ useRepo: 'readonly',
|
|
|
+ },
|
|
|
|
|
|
- parser: parser,
|
|
|
- ecmaVersion: 2020,
|
|
|
- sourceType: "module",
|
|
|
+ parser: parser,
|
|
|
+ ecmaVersion: 2020,
|
|
|
+ sourceType: 'module',
|
|
|
|
|
|
- parserOptions: {
|
|
|
- parser: "@typescript-eslint/parser",
|
|
|
- tsconfigRootDir: "/home/workspace",
|
|
|
- },
|
|
|
+ parserOptions: {
|
|
|
+ parser: '@typescript-eslint/parser',
|
|
|
+ tsconfigRootDir: '/home/workspace',
|
|
|
+ },
|
|
|
},
|
|
|
|
|
|
rules: {
|
|
|
- "no-console": 0,
|
|
|
+ 'no-console': 0,
|
|
|
|
|
|
- "vue/valid-v-slot": ["error", {
|
|
|
- allowModifiers: true,
|
|
|
- }],
|
|
|
+ 'vue/valid-v-slot': [
|
|
|
+ 'error',
|
|
|
+ {
|
|
|
+ allowModifiers: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
|
|
|
- "vue/multi-word-component-names": 0,
|
|
|
- "@typescript-eslint/no-inferrable-types": 0,
|
|
|
+ 'vue/multi-word-component-names': 0,
|
|
|
+ '@typescript-eslint/no-inferrable-types': 0,
|
|
|
},
|
|
|
-}];
|
|
|
+ },
|
|
|
+]
|