-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
69 lines (67 loc) · 1.78 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
require('@rushstack/eslint-patch/modern-module-resolution');
const path = require('node:path');
const createAliasSetting = require('@vue/eslint-config-airbnb/createAliasSetting');
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'@vue/airbnb',
'plugin:vue/vue3-essential',
'@vue/typescript/recommended',
],
parserOptions: {
ecmaVersion: 12,
project: './tsconfig.json',
},
rules: {
eqeqeq: 'off',
'no-multiple-empty-lines': 'off',
'eslint-disable-next-line': 'off',
'import/no-unresolved': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-unused-vars': 'warn',
'func-names': 'off',
'no-process-exit': 'off',
'object-shorthand': 'off',
'class-methods-use-this': 'off',
'consistent-return': 'off',
'no-underscore-dangle': 'off',
'no-shadow': 'off',
'vue/html-indent': 'off',
'vue/max-attributes-per-line': 'off',
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'object-curly-newline': ['warn', { ObjectPattern: { multiline: true } }],
'import/extensions': [
'error',
'ignorePackages',
{
'': 'never',
js: 'never',
jsx: 'never',
ts: 'never',
tsx: 'never',
},
],
},
settings: {
'import/extensions': ['.js', '.mjs', '.jsx', '.ts', '.tsx'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
alias: {
map: [['~', './src/']],
extensions: ['.ts', '.js', '.tsx'],
},
},
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
...createAliasSetting({
'@': `${path.resolve(__dirname, './src')}`,
}),
},
};