generated from cawa-93/vite-electron-builder
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.js
94 lines (84 loc) · 2.01 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import globals from 'globals';
import js from '@eslint/js';
import typescriptLint from 'typescript-eslint';
import pluginVue from 'eslint-plugin-vue';
import eslintConfigPrettier from 'eslint-config-prettier';
export default [
{
ignores: ['node_modules/**/*', '**/dist/**/*'],
},
js.configs.recommended,
...typescriptLint.configs.recommended,
...pluginVue.configs['flat/strongly-recommended'],
// Disable a set of rules that may conflict with prettier
// You can safely remove this if you don't use prettier
eslintConfigPrettier,
{
files: ['**/*.js', '**/*.mjs', '**/*.ts', '**/*.mts', '**/*.vue'],
languageOptions: {
globals: {
...globals.node,
},
parserOptions: {
parser: '@typescript-eslint/parser',
},
},
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
},
],
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/consistent-type-imports': 'error',
semi: ['error', 'always'],
'comma-dangle': ['warn', 'always-multiline'],
quotes: [
'warn',
'single',
{
avoidEscape: true,
},
],
'no-undef': ['error'],
},
},
{
files: ['packages/preload/**'],
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
},
},
{
files: ['packages/renderer/**'],
languageOptions: {
globals: {
...Object.fromEntries(Object.entries(globals.node).map(([key]) => [key, 'off'])),
...globals.browser,
},
},
},
{
files: ['**/tests/**'],
languageOptions: {
globals: {
...globals.node,
...globals.browser,
},
},
},
{
files: ['**/vite.config.*'],
languageOptions: {
globals: {
...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, 'off'])),
...globals.node,
},
},
},
];