-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
53 lines (48 loc) · 1.57 KB
/
eslint.config.js
File metadata and controls
53 lines (48 loc) · 1.57 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
import js from '@eslint/js'
import pluginVue from 'eslint-plugin-vue'
import globals from 'globals'
export default [
// Ignore build output and dependencies
{ ignores: ['js/', 'dist/', 'node_modules/', 'vendor/', 'tests/', 'l10n/'] },
// Base JS recommended rules
js.configs.recommended,
// Vue 3 recommended rules
...pluginVue.configs['flat/recommended'],
// Project-specific settings
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.browser,
OC: 'readonly',
OCA: 'readonly',
OCP: 'readonly',
t: 'readonly',
n: 'readonly',
},
},
rules: {
// JS: unused vars erlaubt mit _ prefix
'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'no-empty': ['error', { allowEmptyCatch: true }],
// Vue: style rules off — existing code style is consistent
'vue/multi-word-component-names': 'off',
'vue/no-v-html': 'off',
'vue/max-attributes-per-line': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/multiline-html-element-content-newline': 'off',
'vue/html-closing-bracket-spacing': 'off',
'vue/attributes-order': 'off',
'vue/no-multi-spaces': 'off',
'vue/no-template-shadow': 'off',
'vue/html-indent': 'off',
'vue/require-toggle-inside-transition': 'off',
'vue/html-self-closing': ['error', {
html: { void: 'always', normal: 'any', component: 'always' },
svg: 'always',
math: 'always',
}],
},
},
]