38 lines
945 B
JavaScript
38 lines
945 B
JavaScript
import { includeIgnoreFile } from '@eslint/compat';
|
|
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';
|
|
import vueTsEslintConfig from '@vue/eslint-config-typescript';
|
|
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 [
|
|
// --ignore-path .gitignore
|
|
includeIgnoreFile(gitignorePath),
|
|
{
|
|
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,
|
|
},
|
|
}),
|
|
|
|
skipFormatting,
|
|
];
|