-
Notifications
You must be signed in to change notification settings - Fork 223
/
.eslintrc.js
50 lines (50 loc) · 1.29 KB
/
.eslintrc.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
module.exports = {
root: true,
env: {
es2022: true,
commonjs: true,
},
parserOptions: {
ecmaVersion: '2024',
sourceType: 'module',
requireConfigFile: false, // <== ADD THIS
},
extends: ['plugin:mdx/recommended', 'plugin:prettier/recommended'],
plugins: ['markdown'],
overrides: [
{
// Enable the Markdown processor for all .md files.
files: ['**/*.md'],
processor: 'markdown/markdown',
},
{
// Customize the configuration ESLint uses for ```js, ```javascript
files: ['**/*.md/*.js', '**/*.md/*.javascript'],
rules: {
'no-undef': 'error',
'no-else-return': 'error',
'no-extra-boolean-cast': 'error',
'no-duplicate-case': 'error',
'no-const-assign': 'error',
'no-dupe-args': 'error',
'no-dupe-else-if': 'error',
'no-var': 'error',
'use-isnan': 'error',
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
'prefer-const': 'error',
},
},
],
globals: {
console: 'readonly',
__VU: 'readonly',
__ENV: 'readonly',
__ITER: 'readonly',
open: 'readonly',
window: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
},
};