Skip to content

Conversation

lumirlumir
Copy link
Collaborator

@lumirlumir lumirlumir commented Sep 20, 2024

안녕하세요😊

기존 ko.react.dev 레포지토리는 코드를 수정하고 저장(ctrl + s or command + s) 등을 눌러도 코드 포매팅이 자동으로 수정되지 않아 불편함을 느꼈습니다.

.huskylint-staged를 통한 pre-commit 훅을 통해 자동 포매팅 수정이 이루어지기는 하지만, 이는 코드 수정이 모두 완료된 커밋 직전에야 진행될 뿐입니다.

따라서, 저장 버튼을 누를 때 마다 코드 포매팅이 수정되면 훨씬 좋을 것 같아 .vscode/settings.json 파일을 통해 VScode에서 저장 버튼을 누르면 자동으로 코드 포매팅이 수정되도록 하였습니다.

VScode는 가장 대중적인 에디터라 해당 파일을 추가해두면 많은 사람들이 활용할 수 있을 것 같습니다.

수정 내역은 아래와 같습니다.

  1. "editor.formatOnSave": true,: 저장 버튼을 누를 때 마다 코드 포매팅이 자동으로 수정됩니다.
  2. "editor.formatOnPaste": true,: 붙여넣기를 할 때 마다 코드 포매팅이 자동으로 수정됩니다.
  3. "editor.defaultFormatter": "esbenp.prettier-vscode",: 기본 포매터로 prettier를 설정합니다.
  4. "editor.codeActionsOnSave": {"source.fixAll.eslint": "always"}: 저장 버튼을 누를 때 마다 eslint의 fix 옵션이 자동으로 적용됩니다.

Progress

@vercel
Copy link

vercel bot commented Sep 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ko-react-dev 🔄 Building (Inspect) Visit Preview 💬 Add feedback Sep 23, 2024 6:51am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
ko-legacy-reactjs-org ⬜️ Ignored (Inspect) Visit Preview Sep 23, 2024 6:51am

@github-actions
Copy link

github-actions bot commented Sep 20, 2024

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link
Member

@hg-pyun hg-pyun left a comment

Choose a reason for hiding this comment

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

vscode의 설정들은 개취의 영역이라 오픈소스 기본 설정에 들어가도 되는지 약간 고민이 되긴 하네요. 🤔

@lumirlumir
Copy link
Collaborator Author

lumirlumir commented Sep 22, 2024

babel, prettier

위 레포지토리들에서는 settings.example.json이라는 형태로 해당 파일을 제공하고 있고

next.js, svelte

위 레포지토리들에서는 settings.json 파일 형태로 그대로 제공하고 있습니다.

규모가 큰 프로젝트들에서도 해당 파일을 제공하고 있고, 또한 웹 개발 쪽에서는 VScode 점유율이 워낙 높다보니, 해당 파일을 추가해도 좋지 않을까 조심스레 제안해 봅니다...!


그리고 혹시 추가로, collaborator 말고 member 권한으로도 승격이 가능한가요..?🙇‍♂️

translate.react.dev의 issue를 확인해보니, (reactjs/translations.react.dev#283 (comment)) reactjs에서는 더 이상 멤버 관리를 하지 않아, 현재 레포지토리의 메인테이너 분들께 여쭤보라고 되어있어서요🥲🥲 한번 확인해주시면 감사하겠습니다...! @hg-pyun

Copy link
Member

@hg-pyun hg-pyun left a comment

Choose a reason for hiding this comment

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

옙 저도 자주 사용하는 설정이라 이견은 없습니다. 크리티컬한 건 아니라서 일단 머시하시죠 ㅋㅋ

@hg-pyun
Copy link
Member

hg-pyun commented Sep 22, 2024

그리고 혹시 추가로, collaborator 말고 member 권한으로도 승격이 가능한가요..?🙇‍♂️

@lumirlumir 저도 추가해드리고 싶긴한데.. 일단 저도 member 추가 권한은 없고, 처음 legacy-react.org를 작업할 당시에는 어디 레포지토리에서 PR로 메인터넌서 아이디를 적어서 제출하면 봇이 추가해줬던 것으로 기억합니다. 그 레포지토리를 찾아보고 있는데 안보이네요 ㅠㅠ 정책이 바뀌었을 수도 있습니다. react.dev repo에 문의해보는게 좋을 것 같아요.

https://github.com/reactjs/translations.react.dev?tab=readme-ov-file#adding-a-maintainer

@gnujoow 님 혹시 기억나실까요? 🙏

@lumirlumir
Copy link
Collaborator Author

싶긴한데.. 일단 저도 member 추가 권한은 없고, 처음 legacy-react.org를 작업할 당시에는 어디 레포지토리에서 PR로 메인터넌서 아이디를 적어서 제출하면 봇이 추가해줬던 것으로 기억합니다. 그 레포지토리를 찾아보고 있는데 안보이네요 ㅠㅠ 정책이 바뀌었을 수도 있습니다. react.dev repo에 문의해보는게 좋을 것 같아요.

@hg-pyun 신경 써주셔서 감사합니다🥲🙇‍♂️🙇‍♂️

@lumirlumir lumirlumir merged commit 7417ab6 into reactjs:main Sep 24, 2024
5 checks passed
@lumirlumir lumirlumir deleted the feat-vscode-settings branch September 24, 2024 04:03
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.

2 participants