Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add files for codereview #1

Merged
merged 5 commits into from
Jan 4, 2019
Merged

add files for codereview #1

merged 5 commits into from
Jan 4, 2019

Conversation

jinwoo-kim-nhn
Copy link
Owner

No description provided.

.eslintrc.js Outdated
globals: {'_': true},
// add your custom rules here
rules: {
indent: [2, 2, {SwitchCase: 1, ignoreComments: false, ImportDeclaration: 1, flatTernaryExpressions: false}]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 tsconfig 쪽처럼 주석으로 가이드 하는 것이 어떨까요? 여기에서 예제로 설정한 것들은 상속받아서 쓰고 있으면 빼는게 맞을거 같아요.

.prettierrc Outdated
@@ -0,0 +1,8 @@
{
"trailingComma": "none",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

기본값은 굳이 선언할 필요가 없어 보입니다. 정적 분석 문서에서 예제 코드로 썼던 부분들을 활용한 경우 디폴트값인지 확인 부탁 드려요.

@dongsik-yoo
Copy link

dongsik-yoo commented Jan 2, 2019

의논 필요 사항

  • es5도 모듈패턴으로 개발할 수 있도록 환경을 설정해야 하는 것이 아닌가 싶습니다. 기존에 나간 가이드 문서의 기조와 맞지 않는 부분 같습니다. (모듈로 개발하고, 번들러를 사용)
  • 보일러플레이트의 IE 지원 범위가 어디까지인지 확인 필요합니다.
  • 라이브러리 개발용인지 서비스 개발용인지 구분이 되어야 하나요? package.json의 main필드가 선언되어 있어서 혼동을 줍니다.
  • LICENSE 파일 통일 필요
  • 번들된 파일 포함해야 할지 결정 필요('dist'폴더 하위)
  • 소스 파일 상단 배너 사용할지 결정 필요

README.md Outdated

## Browser support

#### Supports all browsers

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TOAST UI 와 같이 테이블로 작성하면 좋을 것 같아요.
image

package.json Outdated
"eslint-plugin-prettier": "^3.0.0",
"prettier": "^1.15.1"
},
"dependencies": {
Copy link

@dongsik-yoo dongsik-yoo Jan 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

디펜던시는 없어야 할 것 같고, 있다면 차라리 코드 스니펫을 쓰는게 어떨까 합니다.

}

.button:hover {
box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

브라우저 지원 범위가 IE9이상인 보일러 플레이트인지 확인이 필요할 거 같아요.

package.json Outdated
"name": "es5-boilerplate",
"version": "0.0.1",
"description": "",
"main": "index.js",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 보일러플레이트에서는 필요없는 필드로 보여요. 모듈 개발 패턴으로 가지 않으면 제거하는게 나을 것 같습니다.

package.json Outdated
"lint": "eslint src",
"dev": "browser-sync start --config bs-config.js --startPath 'src/index.html'"
},
"author": "",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

작성자는 다른 컴포넌트처럼 아래와 같이 작성하면 될 것 같습니다.
NHNEnt FE Development Lab <dl_javascript@nhnent.com>

text-align: center;
position: relative;
top: 50%;
transform: translateY(-50%);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 브라우저 지원범위 확인하고 사용해야 할 것 같습니다.

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

head 쪽에 보다 풍부하게 보일러플레이트가 들어가야 할 것 같아요.
뷰포트 메타 태그랄지, og 태그 랄지.
예> https://gist.github.com/nunosans/3028849

이 부분은 우리의 보일러플레이트가 어떤 범위까지 제공하고 집중하는지 의논해 보아야 할 것 같습니다.

</div>
<div id="message"></div>

<script>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

문제 없는 코드이지만, 내부 스크립트는 외부 스크립트보다 아래에 있는게 안심하고 쓸 수 있지 않을까 의견 드립니다.

src/js/index.js Outdated
* @param {HTMLElement} element - control element
*/
function HelloWorld(element) {
var $wrapper = $(element);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jquery 바로 쓰면 린트에러 안 나던가요? .eslintrc의 "globals"에 추가해야 될거 같은데 확인 부탁합니다.

this.addEvent();
}

HelloWorld.prototype.addEvent = function() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기도 JSDOC을 일관적으로 작성해야 하겠습니다.

@dongsik-yoo
Copy link

[01/02] 리뷰 완료했습니다. 수고하셨어요.

@@ -0,0 +1,8 @@
{
"trailingComma": "none",
"printWidth": 120,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

토스트파일은 100 으로 사용중입니다만.. 우리 표준이 필요할 것 같네요.


[hidden] {
display: none;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

css가 불필요하게 긴 느낌이네요. 굳이 normalize를 포함하지 않아도 될 것 같아요.

@dongwoo-kim
Copy link

  • 번들러를 사용하지 않는 경우, 어떻게 사용될 수 있는지를 고민해봐야 할 것 같습니다. 사용예가 좀 애매할 것 같아요.
  • jquery와 lodash가 기본으로 포함되어 있는 건 보일러플레이트 용도와는 맞지 않는 것 같아요.
  • 이 보일러플레이트(ES5)는 특히 경우 어떨 때 사용하는지에 대한 정확한 설명이 README에 적혀 있어야 할 것 같습니다.

@jinwoo-kim-nhn jinwoo-kim-nhn merged commit 4329bbe into forPreview Jan 4, 2019
jinwoo-kim-nhn added a commit that referenced this pull request Jan 4, 2019
* delete code for codereview

* add files for codereview (#1)

* add files for codereview

* apply codereview

* apply to codereview for readme

* apply codereview 2

* apply codereview 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants