-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
executable file
·102 lines (101 loc) · 2.98 KB
/
eslint.config.mjs
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
import withNuxt from './.nuxt/eslint.config.mjs';
import tailwindcss from 'eslint-plugin-tailwindcss';
export default withNuxt({
files: ['**/*.js', '**/*.ts', '**/*.tsx', '**/*.mjs', '**/*.vue'],
plugins: {
tailwindcss,
},
rules: {
...tailwindcss.configs.recommended.rules,
'tailwindcss/no-custom-classname': 'off',
'@typescript-eslint/object-curly-spacing': [
2,
'always',
{
arraysInObjects: true,
objectsInObjects: true,
},
],
'@typescript-eslint/array-type': [
'error',
{
default: 'array',
},
],
'@typescript-eslint/no-invalid-void-type': 'off',
'@typescript-eslint/prefer-as-const': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
ignoreRestSiblings: true,
varsIgnorePattern: '^_',
argsIgnorePattern: '^_',
},
],
'vue/multi-word-component-names': 'off',
'vue/no-multiple-template-root': 'off',
'vue/object-curly-spacing': [2, 'always'],
'vue/html-closing-bracket-spacing': [
2,
{
selfClosingTag: 'always',
},
],
'vue/max-attributes-per-line': [
2,
{
singleline: { max: 3 },
multiline: { max: 1 },
},
],
'vue/html-indent': ['error', 4],
'vue/no-v-html': 'off',
'vue/require-prop-types': 'off',
'vue/html-closing-bracket-newline': [
'error',
{
singleline: 'never',
multiline: 'always',
},
],
'vue/mustache-interpolation-spacing': ['error', 'always'],
semi: [2, 'always'],
indent: ['error', 4],
quotes: [
2,
'single',
{
avoidEscape: true,
},
],
'brace-style': [
2,
'1tbs',
{
allowSingleLine: true,
},
],
'block-spacing': ['error', 'always'],
'prefer-spread': 'error',
'no-restricted-syntax': [
'error',
{
selector: 'ForStatement',
message:
'For loops are not allowed. Use iterable methods or for..of loops instead.',
},
],
'prefer-const': 'error',
'prefer-template': 'error',
eqeqeq: ['error', 'always'],
'object-shorthand': 'error',
'default-param-last': 'error',
'arrow-body-style': ['error', 'as-needed'],
'no-param-reassign': 'error',
'prefer-arrow-callback': 'error',
'no-else-return': 'error',
'eol-last': ['error', 'always'],
'comma-dangle': ['error', 'always-multiline'],
},
});