-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy patheslint.config.js
More file actions
67 lines (63 loc) · 1.8 KB
/
Copy patheslint.config.js
File metadata and controls
67 lines (63 loc) · 1.8 KB
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
58
59
60
61
62
63
64
65
66
67
import path from 'node:path';
import pluginJs from '@eslint/js';
import tjwBase from 'eslint-config-tjw-base';
import tjwImport from 'eslint-config-tjw-import';
import tjwJest from 'eslint-config-tjw-jest';
import tjwVue from 'eslint-config-tjw-vue';
import pluginImport from 'eslint-plugin-import';
import pluginJest from 'eslint-plugin-jest';
import pluginVue from 'eslint-plugin-vue';
import pluginVueA11y from 'eslint-plugin-vuejs-accessibility';
const __dirname = import.meta.dirname;
const vue3Recommended = pluginVue.configs['flat/recommended'];
const vueA11yRecommended = pluginVueA11y.configs['flat/recommended'];
export default [
pluginJs.configs.recommended,
pluginImport.flatConfigs.recommended,
pluginJest.configs['flat/recommended'],
...vue3Recommended,
...vueA11yRecommended,
tjwBase.configs.recommended,
tjwImport,
tjwJest.configs.recommended,
tjwVue,
{
// project specific rules/settings
languageOptions: {
globals: {
vi: true
}
},
rules: {
'import/no-unused-modules': 'off',
'import/no-extraneous-dependencies': 'off',
// If this is not turned off, linting throws because it can't find 'jest' install
'jest/no-deprecated-functions': 'off',
'vuejs-accessibility/label-has-for': [
'error',
{
components: ['Label'],
required: {
some: ['nesting', 'id']
},
allowChildren: false
}
]
},
settings: {
'import/resolver': {
vite: {
viteConfig: {
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
'@@': path.resolve(__dirname, 'tests'),
'@@@': path.resolve(__dirname, 'docs')
}
}
}
}
}
}
}
];