-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1304ea7
commit 9102223
Showing
9 changed files
with
82 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
{ | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": ["@typescript-eslint", "prettier"], | ||
"extends": ["plugin:@typescript-eslint/recommended", "plugin:react/recommended", "plugin:prettier/recommended", "airbnb"], | ||
"rules": {"prettier/prettier": ["error", { "endOfLine": "auto" }],"react/react-in-jsx-scope": "off"}, | ||
"extends": ["plugin:@typescript-eslint/recommended", "plugin:react/recommended", "plugin:prettier/recommended"], | ||
"rules": {"prettier/prettier": ["error", { "endOfLine": "auto" }], "react/react-in-jsx-scope": "off"}, | ||
"ignorePatterns": ["craco.config.js"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,50 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
plugins: ['commitlint-plugin-function-rules'], | ||
rules: { | ||
// 스코프는 컨벤션과 맞지 않기에, 사용하지 않는 것으로 한다. | ||
'scope-empty': [2, 'always'], | ||
// 헤더의 길이는 50자로 제한한다. | ||
'header-max-length': [2, 'always', 50], | ||
// 본문의 한 줄은 72자로 제한한다. | ||
'body-max-line-length': [2, 'always', 72], | ||
// 타입은 아래의 태그만 사용하도록 한다. | ||
'type-enum': [2, 'always', ['feat', 'fix', 'refactor', 'style', 'docs', 'test', 'chore']], | ||
'subject-full-stop': [0], | ||
'function-rules/subject-full-stop': [ | ||
2, | ||
'always', | ||
({ subject, header, body, raw }) => { | ||
// 이슈 번호로 종료되는가? | ||
if (subject && !/[^\.] #[0-9]+$/.test(subject)) | ||
return [false, 'subject는 issue 번호를 #[number] 형식으로 끝에 포함해야하며, .(점) 으로 끝나지 말아야 합니다.']; | ||
extends: ['@commitlint/config-conventional'], | ||
plugins: ['commitlint-plugin-function-rules'], | ||
rules: { | ||
// 스코프는 컨벤션과 맞지 않기에, 사용하지 않는 것으로 한다. | ||
'scope-empty': [2, 'always'], | ||
// 헤더의 길이는 50자로 제한한다. | ||
'header-max-length': [2, 'always', 50], | ||
// 본문의 한 줄은 72자로 제한한다. | ||
'body-max-line-length': [2, 'always', 72], | ||
// 타입은 아래의 태그만 사용하도록 한다. | ||
'type-enum': [2, 'always', ['feat', 'fix', 'refactor', 'style', 'docs', 'test', 'chore']], | ||
'subject-full-stop': [0], | ||
'function-rules/subject-full-stop': [ | ||
2, | ||
'always', | ||
({ subject, header, body, raw }) => { | ||
// 이슈 번호로 종료되는가? | ||
if (subject && !/[^\.] #[0-9]+$/.test(subject)) { | ||
return [ | ||
false, | ||
'subject는 issue 번호를 #[number] 형식으로 끝에 포함해야하며, .(점) 으로 끝나지 말아야 합니다.', | ||
]; | ||
} | ||
|
||
// 제목과 바디가 공백으로 분리되어있는가? | ||
if (body && raw && header && raw.search('\n\n') !== header.length) | ||
return [false, '제목과 본문은 공백으로 구분해주시기 바랍니다.']; | ||
// 제목과 바디가 공백으로 분리되어있는가? | ||
if (body && raw && header && raw.search('\n\n') !== header.length) { | ||
return [false, '제목과 본문은 공백으로 구분해주시기 바랍니다.']; | ||
} | ||
|
||
return [true]; | ||
}], | ||
'body-leading-blank': [0], | ||
'function-rules/body-leading-blank': [ | ||
2, | ||
'always', | ||
({ body }) => { | ||
// body가 없으면 굳이 판단하지 않는다. | ||
if (!body) | ||
return [true]; | ||
if (body.split('\n').filter(line => !/ *-/.test(line)).length > 0) | ||
return [false, '본문의 각 줄은 - 으로 시작해야 합니다.']; | ||
return [true]; | ||
} | ||
], | ||
}, | ||
} | ||
return [true]; | ||
}, | ||
], | ||
'body-leading-blank': [0], | ||
'function-rules/body-leading-blank': [ | ||
2, | ||
'always', | ||
({ body }) => { | ||
// body가 없으면 굳이 판단하지 않는다. | ||
if (!body) { | ||
return [true]; | ||
} | ||
if (body.split('\n').filter((line) => !/ *-/.test(line)).length > 0) { | ||
return [false, '본문의 각 줄은 - 으로 시작해야 합니다.']; | ||
} | ||
return [true]; | ||
}, | ||
], | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,20 @@ | ||
import React from 'react'; | ||
import logo from './logo.svg'; | ||
import './App.css'; | ||
|
||
function App() { | ||
return ( | ||
<div className="App"> | ||
<header className="App-header"> | ||
<img src={logo} className="App-logo" alt="logo" /> | ||
<p> | ||
Edit | ||
{' '} | ||
<code>src/App.tsx</code> | ||
{' '} | ||
and save to reload. | ||
return ( | ||
<div className="App"> | ||
<header className="App-header"> | ||
<img src={logo} className="App-logo" alt="logo" /> | ||
<p> | ||
Edit <code>src/App.tsx</code> and save to reload. | ||
</p> | ||
<a className="App-link" href="https://reactjs.org" target="_blank" rel="noopener noreferrer"> | ||
Learn React | ||
<a className="App-link" href="https://reactjs.org" target="_blank" rel="noopener noreferrer"> | ||
Learn React | ||
</a> | ||
</header> | ||
</div> | ||
); | ||
); | ||
} | ||
|
||
export default App; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import { ReportHandler } from 'web-vitals'; | ||
|
||
const reportWebVitals = (onPerfEntry?: ReportHandler) => { | ||
if (onPerfEntry && onPerfEntry instanceof Function) { | ||
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { | ||
getCLS(onPerfEntry); | ||
getFID(onPerfEntry); | ||
getFCP(onPerfEntry); | ||
getLCP(onPerfEntry); | ||
getTTFB(onPerfEntry); | ||
}); | ||
} | ||
if (onPerfEntry && onPerfEntry instanceof Function) { | ||
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { | ||
getCLS(onPerfEntry); | ||
getFID(onPerfEntry); | ||
getFCP(onPerfEntry); | ||
getLCP(onPerfEntry); | ||
getTTFB(onPerfEntry); | ||
}); | ||
} | ||
}; | ||
|
||
export default reportWebVitals; |