Vs code

무료이면서 많은 플러그인과 간편한 커스터마이징이 가능한 vs code를 사용했습니다.

1. 키보드 커서 변경

2. .vscode 폴더

vscode를 사용할떄 설치할떄마다 일일히 세팅해주는것이 힘들어서 .vscode 폴더를 만들어서 적용하는 편입니다.

{
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "tailwindCSS.experimental.classRegex": [
    "\\\\/\\\\*\\\\*tw\\\\s?\\\\*\\\\/\\\\s?['|\\"|`]([^'|\\"|`]*)['|\\"|`]",
    "[tw|TW|Tw|tW]\\\\s?[=|:][\\\\s|\\\\n|\\\\t]*[\\"|']([^\\"|']*)[\\"|']"
    // "tw`([^`]*)" // tw`...`
    // "tw=\\"([^\\"|']*)", // <div tw="..." />
    // "tw={\\"([^\\"|'}]*)", // <div tw={"..."} />
    // "tw\\\\.\\\\w+`([^`]*)", // tw.xxx`...`
    // "tw\\\\(.*?\\\\)`([^`]*)" // tw(Component)`...`
  ],
  "tailwindCSS.includeLanguages": {
    "typescript": "javascript",
    "typescriptreact": "javascript"
  },
  "css.validate": false,
  "typescript.tsdk": "node_modules/typescript/lib",
  "typescript.enablePromptUseWorkspaceTsdk": true
}

3. .editorconfig, .gitattributes

aws codedeploy 를 사용할때 분명 기본 줄바꿈 세팅을 lf로 하였으나 sh 파일에서 crlf 에러로 배포실패해서 애간장태웠던 기억이 있었던 뒤론 무조건 .gitattributes를 사용하게 되었습니다.

내용은 다음과 같습니다.

# Auto detect text files and perform LF normalization
*        text=auto

*.sh eol=lf
*.cs     text diff=csharp
*.java   text diff=java
*.html   text diff=html
*.css    text
*.js     text
*.sql    text

*.csproj text merge=union
*.sln    text merge=union eol=crlf

*.docx   diff=astextplain
*.DOCX   diff=astextplain

# absolute paths are ok, as are globs
/**/postinst* text eol-lf

# paths that don't start with / are treated relative to the .gitattributes folder
relative/path/*.txt text eol-lf

.editorconfig는 혹시라도 실서버에서 직접 수정할일이 있을까 싶어 적용해놨습니다.

# editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

# Markdown syntax specifies that trailing whitespaces can be meaningful,
# so let’s not trim those. e.g. 2 trailing spaces = linebreak (<br />)
# See <https://daringfireball.net/projects/markdown/syntax#p>
[*.md]
trim_trailing_whitespace = false

# Disable trailing whitespace removal in diff files,
# where whitespace is meaningful
[*.diff]
trim_trailing_whitespace = false

@types folder


app 전체적으로 사용할 type들은 typeroot를 지정한뒤 @types폴더에 넣는 방법을 애용하는 편입니다. 대략 다음과 같습니다.

Untitled