-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
111 lines (110 loc) · 3.46 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
module.exports = {
root: true,
env: {
browser: true,
node: true,
'vue/setup-compiler-macros': true,
},
globals: {
expect: true,
},
extends: [
'prettier',
'airbnb-base',
'plugin:vue/vue3-essential',
'@vue/eslint-config-typescript/recommended',
],
plugins: ['prettier', 'vue'],
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
project: './tsconfig.json',
},
rules: {
semi: 'off',
quotes: ['warn', 'single'],
indent: ['warn', 'tab'],
'import/prefer-default-export': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'max-len': [
'warn',
{
code: 160,
ignoreComments: true,
ignoreTrailingComments: true,
ignoreUrls: true,
ignorePattern: '^\\s*var\\s.+=\\s*require\\s*\\(',
},
],
'no-unref': 'off',
'no-undef': 'off',
'no-unused-vars': 'warn',
'no-console': 'off',
'no-tabs': 'off',
'no-restricted-syntax': 'off',
'no-unsafe-optional-chaining': 'off',
'func-names': 'off',
'arrow-parens': ['error', 'as-needed'],
'object-curly-newline': [
'error',
{
ObjectExpression: { consistent: true, multiline: true },
ObjectPattern: { consistent: true, multiline: true },
ImportDeclaration: { consistent: true, multiline: true },
ExportDeclaration: { multiline: true, minProperties: 3 },
},
],
'import/extensions': [
'error',
'ignorePackages',
{
js: 'never',
mjs: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
},
settings: {
'import/resolver': {
alias: {
map: [['@', './src']],
extensions: ['.ts', '.js', '.jsx', 'vue', '.json', '.vue'],
},
},
},
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
},
overrides: [
{
files: ['*.ts', '*.tsx'], // Your TypeScript files extension
// As mentioned in the comments, you should extend TypeScript plugins here,
// instead of extending them outside the `overrides`.
// If you don't want to extend any rules, you don't need an `extends` attribute.
extends: ['airbnb-typescript/base'],
parserOptions: {
project: ['./tsconfig.json'], // Specify it only for TypeScript files
},
rules: {
semi: 'off',
'no-restricted-globals': 'off',
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/indent': ['warn', 4],
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'no-unused-vars': 'warn',
'no-console': 'off',
'no-tabs': 'off',
'no-restricted-syntax': 'off',
'func-names': 'off',
'arrow-parens': ['error', 'as-needed'],
},
},
],
}