-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.cjs
57 lines (56 loc) · 1.59 KB
/
.eslintrc.cjs
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
/* eslint-env node */
require('@rushstack/eslint-patch/modern-module-resolution')
module.exports = {
root: true,
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
// Allows for the parsing of JSX
jsx: true
}
},
extends: [
'@vue/eslint-config-prettier',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-essential',
'eslint:recommended',
'@vue/eslint-config-typescript/recommended'
],
env: {
'vue/setup-compiler-macros': true
},
ignorePatterns: ['dist'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'import/newline-after-import': ['error', { count: 1 }],
'space-before-function-paren': [
'warn',
{
anonymous: 'never',
asyncArrow: 'always',
named: 'never'
}
],
'array-bracket-spacing': 'off',
'vue/func-call-spacing': 'off',
'vue/multi-word-component-names': 'warn',
'func-call-spacing': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/no-extra-semi': 'off'
},
plugins: ['@typescript-eslint', 'import'],
overrides: [
{
files: ['*.ts', '*.vue'],
rules: {
'no-undef': 'off'
}
}
]
}