Use a more standard eslint.config.js

This commit is contained in:
Matthias 2024-04-25 16:57:20 +02:00
parent 4e2735ecaa
commit 470298230c

View File

@ -4,7 +4,7 @@ import pluginVue from 'eslint-plugin-vue';
import globals from 'globals';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import tsEslint from 'typescript-eslint';
import tseslint from 'typescript-eslint';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
@ -16,14 +16,19 @@ const compat = new FlatCompat({
export default [
{ languageOptions: { globals: globals.browser } },
pluginJs.configs.recommended,
...tsEslint.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs['flat/recommended'],
...compat.extends('@vue/eslint-config-typescript/recommended'),
...compat.extends('@vue/eslint-config-prettier'),
{
// languageOptions: {
// parserOptions: {
// parser: '@typescript-eslint/parser',
// },
// },
rules: {
// disable eslint no-shadow as it's causing false positives on typescript enums
'no-shadow': 'off',
// // disable eslint no-shadow as it's causing false positives on typescript enums
// 'no-shadow': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
},