44 lines
1.3 KiB
JavaScript
44 lines
1.3 KiB
JavaScript
import { includeIgnoreFile } from '@eslint/compat';
|
|
import pluginVitest from '@vitest/eslint-plugin';
|
|
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';
|
|
import vueTsEslintConfig from '@vue/eslint-config-typescript';
|
|
import oxlint from 'eslint-plugin-oxlint';
|
|
import pluginVue from 'eslint-plugin-vue';
|
|
import path from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
const gitignorePath = path.resolve(__dirname, '.gitignore');
|
|
|
|
/**
|
|
* @type import('eslint').Linter.Config[]
|
|
*/
|
|
export default [
|
|
includeIgnoreFile(gitignorePath), // oxlint . --fix -D correctness --ignore-path .gitignore
|
|
{
|
|
name: 'app/files-to-lint',
|
|
files: ['**/*.{ts,mts,tsx,vue}'],
|
|
},
|
|
|
|
{
|
|
name: 'app/files-to-ignore',
|
|
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
|
|
},
|
|
|
|
...pluginVue.configs['flat/essential'],
|
|
...vueTsEslintConfig({ supportedScriptLangs: { ts: true, tsx: true } }),
|
|
{
|
|
...pluginVitest.configs.recommended,
|
|
files: ['src/**/__tests__/*'],
|
|
},
|
|
oxlint.configs['flat/recommended'],
|
|
skipFormatting,
|
|
{
|
|
rules: {
|
|
'vue/multi-word-component-names': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
},
|
|
},
|
|
];
|