-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
84 lines (84 loc) · 2.61 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
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'standard-with-typescript',
'plugin:vue/vue3-recommended',
'plugin:tailwindcss/recommended',
],
overrides: [
{
env: {
node: true,
},
files: [
'.eslintrc.{js,cjs}',
],
parserOptions: {
sourceType: 'script',
},
},
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
parser: '@typescript-eslint/parser',
project: ['./tsconfig.json', './tsconfig.node.json'],
extraFileExtensions: ['.vue'],
},
plugins: [
'vue',
],
ignorePatterns: ['dist'],
rules: {
'@typescript-eslint/triple-slash-reference': 'off',
'@typescript-eslint/comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'only-multiline',
}],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/strict-boolean-expressions': 'off',
'vue/multi-word-component-names': 'off',
'vue/max-attributes-per-line': ['error', {
singleline: { max: 3 },
multiline: { max: 1 },
}],
'vue/component-tags-order': ['error', {
order: ['script', 'template', 'style'],
}],
'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', 'never', { autofix: true }],
'vue/attribute-hyphenation': ['error', 'never'],
'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/singleline-html-element-content-newline': 'off',
'tailwindcss/no-custom-classname': ['warn', {
whitelist: ['scroll'],
}],
},
}