-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.eslintrc.js
119 lines (113 loc) · 4.03 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
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
module.exports = {
// https://eslint.org/docs/user-guide/configuring#configuration-cascading-and-hierarchy
// This option interrupts the configuration hierarchy at this file
// Remove this if you have an higher level ESLint config file (it usually happens into a monorepos)
root: true,
parser: 'vue-eslint-parser',
parserOptions: {
project: ['tsconfig.json'],
extraFileExtensions: ['.vue', '.ts', '.js'],
parser: '@typescript-eslint/parser',
// parser: 'babel-eslint',
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
env: {
browser: true,
},
extends: [
// Rules order is important, please avoid shuffling them
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended',
'eslint:recommended',
'prettier',
'plugin:prettier/recommended',
// Rules order is important, please avoid shuffling them
// 'plugin:@typescript-eslint/eslint-recommended',
// 'plugin:@typescript-eslint/recommended',
// 'eslint:recommended',
// "plugin:vue/vue3-recommended",
// "prettier",
// // Base ESLint recommended rules
// 'plugin:vue/vue3-essential',
// 'airbnb-base',
// "airbnb-typescript",
// 'prettier',
// // https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#usage
// // ESLint typescript rules
// 'plugin:@typescript-eslint/eslint-recommended',
// 'plugin:@typescript-eslint/recommended',
// // consider disabling this class of rules if linting takes too long
// // 'plugin:@typescript-eslint/recommended-requiring-type-checking',
// // https://eslint.vuejs.org/rules/#priority-a-essential-error-prevention
// // consider switching to `plugin:vue/strongly-recommended` or `plugin:vue/recommended` for stricter rules
// // --- ONLY WHEN USING PRETTIER ---
// // https://github.com/prettier/eslint-config-prettier#installation
// // usage with Prettier, provided by 'eslint-config-prettier'.
// 'eslint:recommended',
// // this two has been merged with prettier in version 8.0.0
// // 'prettier/@typescript-eslint', // merged with prettir in v8
// // 'prettier/vue', // merged with prettir in v8
],
plugins: [
// https://eslint.vuejs.org/user-guide/#why-doesn-t-it-work-on-vue-file
// required to lint *.vue files
'vue',
'prettier',
'import',
'@typescript-eslint',
],
globals: {
ga: 'readonly', // Google Analytics
cordova: 'readonly',
__statics: 'readonly',
__QUASAR_SSR__: 'readonly',
__QUASAR_SSR_SERVER__: 'readonly',
__QUASAR_SSR_CLIENT__: 'readonly',
__QUASAR_SSR_PWA__: 'readonly',
process: 'readonly',
Capacitor: 'readonly',
chrome: 'readonly',
},
// add your custom rules here
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
'vue/no-mutating-props': ['warn'],
'vue/no-v-html': 'off',
// 'prettier/prettier': ['error'],
// 'no-param-reassign': 'off',
// 'no-void': 'off',
// 'no-nested-ternary': 'off',
// 'max-classes-per-file': 'off',
// 'import/first': 'off',
// 'import/named': 'error',
// 'import/namespace': 'error',
// 'import/default': 'error',
// 'import/export': 'error',
// 'import/extensions': 'off',
// 'import/no-unresolved': 'off',
// 'import/no-extraneous-dependencies': 'off',
// 'import/prefer-default-export': 'off',
// 'prefer-promise-reject-errors': 'off',
// 'no-tabs': 'off',
// 'max-len': [
// 'off',
// {
// code: 150,
// },
// ],
// 'vue/no-mutating-props': 'warn',
// 'no-restricted-syntax': 'off',
// 'object-curly-newline': 'off',
// 'no-unused-vars': 'off',
// 'operator-linebreak': 'off',
// 'vue/require-v-for-key': 'warn',
// 'guard-for-in': 'warn',
// 'no-continue': 'warn',
// 'new-cap': 'warn',
// 'no-cond-assign': 'warn',
// 'no-use-before-define': 'warn',
// 'import/no-mutable-exports': 'warn',
},
};