-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy patheslint.config.js
45 lines (43 loc) · 1.22 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import js from '@eslint/js'
import withNuxt from './.nuxt/eslint.config.mjs'
import standard from 'eslint-config-standard'
import pluginVue from 'eslint-plugin-vue'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
import nodePlugin from 'eslint-plugin-n'
import pluginPromise from 'eslint-plugin-promise'
import vitest from '@vitest/eslint-plugin'
export default withNuxt([
{
name: 'app/files-to-lint',
files: ['**/*.{js,ts,mts,tsx,vue}'],
},
{
name: 'app/files-to-ignore',
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**', '**/dump/**'],
},
{ plugins: { n: nodePlugin } },
pluginPromise.configs['flat/recommended'],
js.configs.recommended,
{ rules: standard.rules },
...pluginVue.configs['flat/recommended'],
...vueTsEslintConfig(),
skipFormatting,
{
rules: {
'vue/multi-word-component-names': 'off',
'vue/no-multiple-template-root': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-nested-ternary': 'error',
},
},
{
files: ['**/*.spec.js', '**/*.test.js'],
plugins: {
vitest,
},
rules: {
...vitest.configs.all.rules,
},
},
])