40 lines
1.4 KiB
TypeScript
40 lines
1.4 KiB
TypeScript
|
import { globalIgnores } from 'eslint/config';
|
||
|
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript';
|
||
|
import tseslint from 'typescript-eslint';
|
||
|
import globals from 'globals';
|
||
|
import pluginVue from 'eslint-plugin-vue';
|
||
|
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';
|
||
|
import stylistic from '@stylistic/eslint-plugin';
|
||
|
import stylisticJsx from '@stylistic/eslint-plugin-jsx';
|
||
|
|
||
|
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
|
||
|
import { configureVueProject } from '@vue/eslint-config-typescript';
|
||
|
configureVueProject({ scriptLangs: ['ts', 'tsx'] });
|
||
|
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
|
||
|
|
||
|
export default defineConfigWithVueTs(
|
||
|
{
|
||
|
name: 'app/files-to-lint',
|
||
|
files: ['**/*.{ts,mts,tsx,vue}'],
|
||
|
},
|
||
|
|
||
|
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
|
||
|
|
||
|
pluginVue.configs['flat/essential'],
|
||
|
{ files: ['**/*.{js,mjs,cjs,ts,mts,cts,vue}'], languageOptions: { globals: globals.browser } },
|
||
|
vueTsConfigs.recommended,
|
||
|
skipFormatting,
|
||
|
tseslint.configs.recommended,
|
||
|
pluginVue.configs['flat/essential'],
|
||
|
{ files: ['**/*.vue'], languageOptions: { parserOptions: { parser: tseslint.parser } } },
|
||
|
stylisticJsx.configs.all,
|
||
|
stylistic.configs.customize({
|
||
|
indent: 2,
|
||
|
quotes: 'single',
|
||
|
semi: true,
|
||
|
jsx: true,
|
||
|
braceStyle: '1tbs',
|
||
|
arrowParens: true,
|
||
|
}),
|
||
|
);
|