feat: init
This commit is contained in:
44
eslint.config.ts
Normal file
44
eslint.config.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
|
||||
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: {
|
||||
'import/order': [
|
||||
'error',
|
||||
{
|
||||
groups: [['builtin', 'external'], 'internal', ['parent', 'sibling', 'index']],
|
||||
'newlines-between': 'always',
|
||||
alphabetize: {
|
||||
order: 'asc',
|
||||
caseInsensitive: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
skipFormatting,
|
||||
)
|
||||
Reference in New Issue
Block a user