-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
63 lines (61 loc) · 1.67 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
58
59
60
61
62
63
// @ts-check
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
import vueTsEslintConfig from '@vue/eslint-config-typescript'
import simpleImportSort from 'eslint-plugin-simple-import-sort'
import sonarjs from 'eslint-plugin-sonarjs'
import pluginVue from 'eslint-plugin-vue'
import tseslint from 'typescript-eslint'
export default tseslint.config(
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue}', 'scripts/**/*', '*.config.js'],
plugins: {
'simple-import-sort': simpleImportSort
},
rules: {
semi: [2, 'never'],
'@typescript-eslint/consistent-type-imports': 'error',
'no-console': 'error',
'no-duplicate-imports': 'error',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error'
}
},
{
name: 'app/files-to-ignore',
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**']
},
{
name: 'app/scripts',
files: ['scripts/**/*', '*.config.js'],
rules: {
'no-console': 'off',
}
},
sonarjs.configs.recommended,
...pluginVue.configs['flat/recommended'],
...vueTsEslintConfig(),
skipFormatting,
{
files: ['**/*.vue', '*.vue'],
rules: {
'vue/component-name-in-template-casing': [
'error',
'PascalCase',
{
registeredComponentsOnly: false,
ignores: ['iconify-icon']
}
],
'vue/match-component-file-name': [
'error',
{
extensions: ['vue', 'jsx', 'tsx'],
shouldMatchCase: true
}
],
'vue/component-definition-name-casing': ['error', 'PascalCase'],
'sonarjs/no-vue-bypass-sanitization': 'warn'
}
}
)