-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
112 lines (112 loc) · 3.11 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
/* eslint-env node */
/**
* @type {import('eslint').Linter.Config}
*
* @see https://eslint.org/docs/latest/user-guide/configuring/
*/
module.exports = {
root: true,
ignorePatterns: ['**/dist/**'],
env: {
'browser': true,
'node': true,
'es2021': true,
'vue/setup-compiler-macros': true,
},
parserOptions: {
ecmaVersion: 2020,
},
/**
* extends는 eslint-config 목록을 재귀적으로 병합하므로, eslint-config 목록의 순서를 변경할 때 유의해야 합니다.
*
* @see https://eslint.org/docs/latest/use/configure/configuration-files#extending-configuration-files
*
* @see https://github.com/vuejs/eslint-config-prettier#usage
* @see https://github.com/vuejs/eslint-config-typescript#usage
*/
extends: [
'plugin:vue/recommended',
'eslint:recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'@vue/eslint-config-typescript/recommended',
'@vue/eslint-config-prettier',
],
rules: {
'@typescript-eslint/consistent-type-imports': [
'warn',
{
prefer: 'type-imports',
},
],
'import/order': [
'warn',
{
'newlines-between': 'always',
'alphabetize': {
order: 'asc',
caseInsensitive: true,
},
},
],
'vue/component-tags-order': [
'error',
{
order: ['script', 'template', 'style'],
},
],
'vue/attribute-hyphenation': ['error', 'never'],
/** @see https://github.com/prettier/eslint-config-prettier#vuehtml-self-closing */
'vue/html-self-closing': [
'error',
{
html: {
void: 'any',
},
},
],
'vue/multi-word-component-names': [
'error',
{
ignores: [
'default',
'index',
'Header',
'login',
'join',
'Retrospect',
'reward',
'Modal',
],
},
],
'vue/no-multiple-template-root': 'off',
},
overrides: [
{
files: ['cypress/e2e/**.{cy,spec}.{js,ts,jsx,tsx}'],
extends: ['plugin:cypress/recommended'],
},
{
files: ['*.js', '*.cjs', '*.jsx'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
{
files: ['src/markup/**/*'],
rules: {
'vue/multi-word-component-names': 'off',
},
},
],
settings: {
/** @see https://github.com/alexgorbatchev/eslint-import-resolver-typescript#configuration */
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: 'tsconfig.json',
},
},
},
};