43 lines
1.5 KiB
TypeScript
43 lines
1.5 KiB
TypeScript
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
|
|
import { globalIgnores } from 'eslint/config'
|
|
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
|
|
import pluginVue from 'eslint-plugin-vue'
|
|
import pluginVitest from '@vitest/eslint-plugin'
|
|
import pluginOxlint from 'eslint-plugin-oxlint'
|
|
import skipFormatting from 'eslint-config-prettier/flat'
|
|
|
|
// 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: ['**/*.{vue,ts,mts,tsx}'],
|
|
},
|
|
|
|
globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
|
|
|
|
...pluginVue.configs['flat/essential'],
|
|
vueTsConfigs.recommended,
|
|
|
|
{
|
|
// shadcn-vue's generated ui/ components use single-word names by convention
|
|
// (Button.vue, Input.vue, ...) so their file names match the CLI's own output.
|
|
name: 'app/shadcn-vue-component-names',
|
|
files: ['**/components/ui/**/*.vue'],
|
|
rules: {
|
|
'vue/multi-word-component-names': 'off',
|
|
},
|
|
},
|
|
|
|
{
|
|
...pluginVitest.configs.recommended,
|
|
files: ['src/**/__tests__/*'],
|
|
},
|
|
|
|
...pluginOxlint.buildFromOxlintConfigFile('.oxlintrc.json'),
|
|
|
|
skipFormatting,
|
|
)
|