-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
100 lines (100 loc) · 2.21 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
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-essential',
'plugin:prettier/recommended',
],
overrides: [
{
env: {
node: true,
},
files: ['.eslintrc.{js,cjs}'],
parserOptions: {
sourceType: 'script',
},
},
{
files: ['resources/js/**/*.vue'],
rules: {
'no-undef': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
},
{
files: ['resources/js/Pages/**/*.vue'],
rules: {
'vue/multi-word-component-names': 'off',
},
},
],
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
plugins: ['@typescript-eslint', 'vue', 'prettier'],
rules: {
'prettier/prettier': 'error',
indent: ['error', 2],
'linebreak-style': ['error', 'unix'],
quotes: ['error', 'single'],
semi: ['error', 'always'],
'vue/attributes-order': [
'error',
{
order: [
'DEFINITION',
'LIST_RENDERING',
'CONDITIONALS',
'RENDER_MODIFIERS',
'GLOBAL',
['UNIQUE', 'SLOT'],
'TWO_WAY_BINDING',
'OTHER_DIRECTIVES',
'OTHER_ATTR',
'EVENTS',
'CONTENT',
],
alphabetical: false,
},
],
'vue/component-tags-order': [
'error',
{
order: [['script', 'template'], 'style'],
},
],
'vue/block-lang': [
'error',
{
script: {
lang: 'ts',
},
},
],
'vue/block-tag-newline': 'error',
'vue/component-api-style': 'error',
'vue/define-emits-declaration': 'error',
'vue/define-macros-order': [
'error',
{
order: ['defineProps', 'defineEmits'],
},
],
'vue/define-props-declaration': 'error',
'vue/padding-line-between-blocks': 'error',
'vue/padding-line-between-tags': [
'error',
[{ blankLine: 'consistent', prev: '*', next: '*' }],
],
'vue/require-default-prop': 'off',
'vue/multi-word-component-names': 'off',
},
};