-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
51 lines (51 loc) · 1.57 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
module.exports = {
root: true,
env: {
browser: true, // 브라우저 환경에서 실행
node: true, // 노드 환경에서 실행
},
parser: 'vue-eslint-parser', // Vue.js 코드를 분석할 때 사용할 파서 지정
parserOptions: {
ecmaVersion: 'latest', // 최신 ECMAScript 버전 사용
parser: '@typescript-eslint/parser', // TypeScript 코드를 파싱하는 데 사용할 파서 지정
sourceType: 'module', // ECMAScript 모듈 형식으로 코드 작성
},
plugins: ['@typescript-eslint', 'vue'],
extends: [
'eslint:recommended', // ESLint에서 권장 규칙 (eslint)
'plugin:vue/recommended', // Vue.js 권장 규칙 (eslint-plugin-vue)
'plugin:@typescript-eslint/recommended', // TypeScript ESLint 규칙 (@typescript-eslint/eslint-plugin)
'plugin:prettier/recommended', // ESLint, Prettier 충돌방지 (eslint-config-prettier, eslint-plugin-prettier)
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'no-console': 'on',
'vue/html-self-closing': [
'warn',
{
html: {
void: 'always',
normal: 'never',
component: 'always',
},
svg: 'always',
math: 'always',
},
],
'prettier/prettier': [
'error',
{
arrowSpacing: ['error', { before: true, after: true }],
singleQuote: true,
semi: true,
useTabs: false,
tabWidth: 2,
trailingComma: 'all',
printWidth: 80,
bracketSpacing: true,
arrowParens: 'always',
endOfLine: 'auto',
},
],
},
};