-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
57 lines (50 loc) · 1.39 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
46
47
48
49
50
51
52
53
54
55
56
57
import pluginVue from 'eslint-plugin-vue'
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
import pluginVitest from '@vitest/eslint-plugin'
import pluginPlaywright from 'eslint-plugin-playwright'
import i18nJsonPlugin from 'eslint-plugin-i18n-json'
import path from 'path'
export default defineConfigWithVueTs(
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue}'],
},
{
name: 'app/files-to-ignore',
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
},
pluginVue.configs['flat/essential'],
vueTsConfigs.recommended,
{
...pluginVitest.configs.recommended,
files: [
'tests/**/*.{j,t}s?(x)',
'src/**/__tests__/*'
],
rules: {
'@typescript-eslint/no-unused-expressions': 'off'
},
},
{
...pluginPlaywright.configs['flat/recommended'],
files: ['tests/e2e/**/*.{test,spec}.{js,ts,jsx,tsx}'],
},
{
files: ['src/locales/*.json'],
plugins: { 'i18n-json': i18nJsonPlugin },
processor: {
meta: { name: '.json' },
...i18nJsonPlugin.processors['.json'],
},
rules: {
'i18n-json/valid-json': 2,
'i18n-json/identical-keys': [2, {
filePath: path.resolve('src/locales/en.json'),
}],
'i18n-json/identical-placeholders': [2, {
filePath: path.resolve('src/locales/en.json'),
ignoreTags: true,
}],
},
},
)