-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy patheslint.config.js
More file actions
83 lines (82 loc) · 2.51 KB
/
eslint.config.js
File metadata and controls
83 lines (82 loc) · 2.51 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
import js from '@eslint/js'
import vue from 'eslint-plugin-vue'
export default [
js.configs.recommended,
...vue.configs['flat/recommended'],
{
ignores: [
'**/venv/**',
'**/node_modules/**',
'**/dist/**',
'**/static/**',
'**/staticfiles/**',
'**/docs/_build/**',
'**/*.min.js',
'**/locale/**',
'**/fixtures/**',
'**/migrations/**',
'**/.git/**',
'**/coverage/**',
'**/.cache/**',
'**/.pytest_cache/**',
'**/js-bundles/**',
],
},
{
files: ['**/*.vue', '**/*.js'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
console: 'readonly',
process: 'readonly',
window: 'readonly',
document: 'readonly',
$: 'readonly',
jQuery: 'readonly',
require: 'readonly',
module: 'readonly',
__dirname: 'readonly',
define: 'readonly',
},
},
rules: {
'comma-dangle': ['error', 'always-multiline'], // Improve diffs
'func-names': 'off', // Conflicts with vue
'object-shorthand': 'off', // Conflicts with vue
'no-underscore-dangle': 'off', // Conflicts with vue
// Vue-plugin lint rules
'vue/require-v-for-key': 'off', // Requires not using <template>; breaks layouts
'vue/require-default-prop': 'off', // Props don't always need defaults
'vue/no-v-html': 'off', // v-html is used intentionally in this project
'vue/no-template-shadow': 'off', // Template shadowing is acceptable in this context
'vue/require-prop-types': 'off', // Prop types are optional in Vue 3 setup
'vue/require-explicit-emits': 'off', // Explicit emits are optional
// Temporary; to fix
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'radix': 'off',
// Standard rules that need to be manually added
'indent': ['error', 2],
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
'no-trailing-spaces': 'error',
'eol-last': 'error',
// Ignore common issues in vendor files
'no-undef': 'off',
'no-unused-vars': 'off',
'no-empty': 'off',
'no-cond-assign': 'off',
'no-redeclare': 'off',
'no-prototype-builtins': 'off',
'no-useless-escape': 'off',
'no-self-assign': 'off',
},
},
{
files: ['**/Popover.vue'],
rules: {
'vue/multi-word-component-names': 'off',
},
},
]