46 lines
1.2 KiB
TypeScript
46 lines
1.2 KiB
TypeScript
import prettierConfig from '@vue/eslint-config-prettier'
|
|
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
|
|
import importPlugin from 'eslint-plugin-import'
|
|
import prettierPlugin from 'eslint-plugin-prettier'
|
|
import pluginVue from 'eslint-plugin-vue'
|
|
|
|
export default defineConfigWithVueTs(
|
|
{ ignores: ['*.d.ts', '**/coverage', '**/dist'] },
|
|
{
|
|
name: 'app/files-to-lint',
|
|
files: ['**/*.{js,jsx,ts,mts,tsx,vue}'],
|
|
},
|
|
vueTsConfigs.recommended,
|
|
pluginVue.configs['flat/recommended'],
|
|
{
|
|
settings: {
|
|
'import/resolver': {
|
|
typescript: {},
|
|
node: {
|
|
extensions: ['js', 'jsx', '.ts', 'tsx', '.vue'],
|
|
},
|
|
},
|
|
},
|
|
plugins: {
|
|
import: importPlugin,
|
|
prettier: prettierPlugin,
|
|
},
|
|
rules: {
|
|
'prettier/prettier': ['error', { endOfLine: 'auto' }],
|
|
'import/order': [
|
|
'error',
|
|
{
|
|
groups: [['builtin', 'external'], 'internal', ['parent', 'sibling', 'index']],
|
|
'newlines-between': 'always',
|
|
alphabetize: {
|
|
order: 'asc',
|
|
caseInsensitive: true,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
},
|
|
|
|
prettierConfig,
|
|
)
|