xcx-shop/eslint.config.ts

36 lines
1.0 KiB
TypeScript

import { globalIgnores } from 'eslint/config'
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
import pluginVue from 'eslint-plugin-vue'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const tsconfigRootDir = path.dirname(fileURLToPath(import.meta.url))
export default defineConfigWithVueTs(
{ name: 'app/files-to-lint', files: ['**/*.{ts,mts,tsx,vue}'] },
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
pluginVue.configs['flat/essential'],
vueTsConfigs.recommended,
skipFormatting,
{
languageOptions: {
parserOptions: {
tsconfigRootDir,
project: ['./tsconfig.json'],
extraFileExtensions: ['.vue']
}
},
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'vue/multi-word-component-names': 'off'
}
},
)