일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- getModifierState
- github
- 컨디셔널 렌더링
- Git
- input type=file
- next.js css
- styled components
- createGlobalStyle
- react env
- rewrites
- nextjs .env
- npm styled-reset
- CSS
- nextjs 설치
- git lab
- nextjs
- SCSS
- ngrok실행
- react
- fetch
- ngrok설치
- API 토큰
- typescript react
- icon
- react typescript
- dart 변수
- bootstrap
- github io
- API token
- There isn’t anything to compare
- Today
- Total
꾸준히 성장하는 개발자
Prettier 본문
An opinionated code formatter - 주도적인 코드포맷터
Prettier · Opinionated Code Formatter
Opinionated Code Formatter
prettier.io
.prettierrc.json 이라는 파일을 만들게 되면 그안에 좀더 디테일하게 설정할수 있다
https://prettier.io/docs/en/options.html
Prettier · Opinionated Code Formatter
Opinionated Code Formatter
prettier.io
옵션은 여기에서 더 확인 가능하다
이 플러그인을 깔아주도록 하자
이렇게 ctrl + shift+ p 를 눌러 나온 저 창에 format Document를 작성해주면 코드가 정리가 된다.
그런데 저장을 할때 바로 정리가 되길 바란다면????
setting.json 파일에 저 부분을 넣어주도록 하자
하.... 나 진짜 저 방법 찾고 싶어서 엄청 돌아다녔는데 강의들으면서 드디어 알았다
나만 prettier 깔았는데도 안되나 했어,,,
단 eslint 와 prettier에서 충돌할수 있는 부분이 있을수 있는데
불필요하게 충돌할수 있는 부분을 제외시켜줘야 한다.
create-react-app 에 있는 eslintconfig 설정에서 위 사진처럼 "prettier"를 붙이게 되면
prettier 때문에 문제가 되던 eslint 설정은 꺼지게 된다.
https://slides.com/woongjae/react2021#/15/10 패캠 공부중
React 2021
리액트 2021
slides.com
'React' 카테고리의 다른 글
react의 라우팅 (0) | 2022.01.24 |
---|---|
husky , lint-staged (0) | 2022.01.23 |
ESLint (0) | 2022.01.22 |
[react] CDN, create-react-app 두가지 방법으로 사용하기 (0) | 2022.01.21 |
Component Lifecycle (0) | 2022.01.21 |