-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
60 lines (56 loc) · 1.57 KB
/
eslint.config.js
File metadata and controls
60 lines (56 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
54
55
56
57
58
59
60
import { defineConfig } from 'eslint-define-config';
import js from '@eslint/js';
import globals from 'globals';
import pluginVue from 'eslint-plugin-vue';
import pluginQuasar from '@quasar/app-vite/eslint';
import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
export default defineConfig([
{
files: ['**/*.{js,ts,vue}'],
ignores: [],
},
...pluginQuasar.configs.recommended(),
js.configs.recommended,
...pluginVue.configs['flat/essential'],
{
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: typescriptParser,
parserOptions: {
project: ['./tsconfig.json'],
tsconfigRootDir: process.cwd(),
extraFileExtensions: ['.vue'],
},
globals: {
...globals.browser,
...globals.node,
process: 'readonly',
ga: 'readonly',
cordova: 'readonly',
Capacitor: 'readonly',
chrome: 'readonly',
browser: 'readonly',
},
},
plugins: {
'@typescript-eslint': typescriptEslintPlugin,
},
rules: {
'prefer-promise-reject-errors': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports' }],
'@typescript-eslint/no-unused-vars': 'warn',
'no-unused-vars': 'warn',
},
},
{
files: ['src-pwa/custom-service-worker.ts'],
languageOptions: {
globals: {
...globals.serviceworker,
},
},
},
]);