-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
67 lines (66 loc) · 2.27 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
import eslint from '@eslint/js'
import globals from 'globals'
import prettierConfig from 'eslint-plugin-prettier/recommended'
import tslint from 'typescript-eslint'
import vuePlugin from 'eslint-plugin-vue'
export default tslint.config(
/*
* Rules order is important, please avoid shuffling them
* Base ESLint recommended rules
*/
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access
eslint.configs.recommended,
/*
* https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage
* ESLint typescript rules
*/
...tslint.configs.strictTypeChecked,
...tslint.configs.stylisticTypeChecked,
// See https://eslint.vuejs.org/rules/#available-rules
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument,@typescript-eslint/no-unsafe-member-access
...vuePlugin.configs['flat/recommended'],
/*
* https://github.com/prettier/eslint-config-prettier#installation
* usage with Prettier, provided by 'eslint-config-prettier'.
*/
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
prettierConfig,
{ ignores: ['.quasar/**', 'dist/**', 'node_modules/**'] },
{
languageOptions: {
// global variables
globals: {
...globals.browser,
...globals.es2021,
...globals.nodeBuiltin,
Capacitor: 'readonly',
__QUASAR_SSR_CLIENT__: 'readonly',
__QUASAR_SSR_PWA__: 'readonly',
__QUASAR_SSR_SERVER__: 'readonly',
__QUASAR_SSR__: 'readonly',
__statics: 'readonly',
chrome: 'readonly',
cordova: 'readonly',
// Google Analytics
ga: 'readonly',
process: 'readonly',
},
/*
* https://eslint.vuejs.org/user-guide/#how-to-use-a-custom-parser
* Must use parserOptions instead of "parser" to allow vue-eslint-parser to keep working
* `parser: 'vue-eslint-parser'` is already included with any 'plugin:vue/**' config and should be omitted
*/
parserOptions: {
ecmaVersion: 'latest',
extraFileExtensions: ['.vue'],
parser: tslint.parser,
project: true,
sourceType: 'module',
},
},
// Add your custom rules here
rules: {
'vue/no-v-html': 'off',
},
},
)