Skip to content

Commit

Permalink
Migrate to eslint flat config file (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert authored Oct 29, 2024
1 parent f4a1395 commit f89d13a
Show file tree
Hide file tree
Showing 5 changed files with 1,767 additions and 1,813 deletions.
6 changes: 6 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue}]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
25 changes: 0 additions & 25 deletions .eslintrc.cjs

This file was deleted.

30 changes: 30 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import pluginVue from 'eslint-plugin-vue'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
import pluginVitest from '@vitest/eslint-plugin'

export default [
{
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(),

{
...pluginVitest.configs.recommended,
files: [
'tests/**/*.{j,t}s?(x)',
'src/**/__tests__/*'
],
rules: {
'@typescript-eslint/no-unused-expressions': 'off'
},
},

]
Loading

0 comments on commit f89d13a

Please sign in to comment.