-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
114 lines (114 loc) · 3.91 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
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
module.exports = {
root: true,
env: {
node: true,
jest: true,
},
globals: {
page: true,
browser: true,
context: true,
puppeteerConfig: true,
jestPuppeteer: true,
},
plugins: [
'tailwindcss',
],
extends: [
'./.eslintrc-auto-import.json',
'plugin:vue/vue3-recommended',
'@vue/standard',
'@vue/eslint-config-typescript/recommended',
'plugin:tailwindcss/recommended',
],
parserOptions: {
ecmaVersion: 2020,
},
ignorePatterns: ['dist/**'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'comma-dangle': 'off',
'no-undef': 'off',
'@typescript-eslint/comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'only-multiline',
}],
'@typescript-eslint/type-annotation-spacing': ['error'],
'@typescript-eslint/member-delimiter-style': ['error', {
multiline: {
delimiter: 'comma',
requireLast: true,
},
singleline: {
delimiter: 'comma',
requireLast: false,
},
multilineDetection: 'brackets',
}],
'space-before-function-paren': 'off',
'@typescript-eslint/space-before-function-paren': ['error', 'always'],
'space-infix-ops': 'off',
'@typescript-eslint/space-infix-ops': ['error'],
indent: 'off',
'@typescript-eslint/indent': ['error', 2, {
SwitchCase: 1,
VariableDeclarator: 1,
outerIIFEBody: 1,
MemberExpression: 1,
FunctionDeclaration: { parameters: 1, body: 1 },
FunctionExpression: { parameters: 1, body: 1 },
CallExpression: { arguments: 1 },
ArrayExpression: 1,
ObjectExpression: 1,
ImportDeclaration: 1,
flatTernaryExpressions: false,
ignoreComments: false,
ignoredNodes: ['TemplateLiteral *', 'JSXElement', 'JSXElement > *', 'JSXAttribute', 'JSXIdentifier', 'JSXNamespacedName', 'JSXMemberExpression', 'JSXSpreadAttribute', 'JSXExpressionContainer', 'JSXOpeningElement', 'JSXClosingElement', 'JSXFragment', 'JSXOpeningFragment', 'JSXClosingFragment', 'JSXText', 'JSXEmptyExpression', 'JSXSpreadChild'],
offsetTernaryExpressions: true,
}],
'vue/multi-word-component-names': 'off',
'func-call-spacing': 'off',
'@typescript-eslint/func-call-spacing': ['error'],
'vue/max-attributes-per-line': ['error', {
singleline: { max: 3 },
multiline: { max: 1 },
}],
'vue/component-tags-order': ['error', {
order: ['script', 'template', 'style'],
}],
'tailwindcss/no-custom-classname': ['warn', {
config: 'tailwind.config.ts',
whitelist: ['neon', 'blink', 'link-effect'],
}],
'vue/no-template-shadow': 'off',
'vue/component-api-style': ['error', ['script-setup']],
'vue/block-lang': ['error', { script: { lang: 'ts' } }],
'vue/component-name-in-template-casing': [
'error', 'PascalCase', { registeredComponentsOnly: false },
],
'vue/html-button-has-type': 'error',
'vue/no-useless-mustaches': 'error',
'vue/no-useless-v-bind': 'error',
'vue/padding-line-between-blocks': 'error',
'vue/prefer-true-attribute-shorthand': 'error',
'vue/v-for-delimiter-style': ['error', 'in'],
'vue/attributes-order': ['error', { alphabetical: true }],
'vue/v-on-event-hyphenation': ['error', 'always', { autofix: true }],
'vue/array-bracket-spacing': 'error',
'vue/arrow-spacing': 'error',
'vue/block-spacing': 'error',
'vue/comma-spacing': 'error',
'vue/func-call-spacing': 'error',
'vue/key-spacing': 'error',
'vue/keyword-spacing': 'error',
'vue/object-curly-spacing': ['error', 'always'],
'vue/space-in-parens': 'error',
'vue/space-infix-ops': 'error',
'vue/space-unary-ops': 'error',
'vue/attribute-hyphenation': ['error', 'never'],
},
}