VSCode에서 IntelliJ로 갈아타면서 Prettier설정을 다시 하게 되었다...
해보자!
막상 해보니 intelliJ에 기본으로 prettier가 깔려있는 것 같다.
ctrl + shift + s 를 눌러 setting (또는 file>setting) 에 들어간다.
plugin탭에서 prettier를 검색한다

isntall을 눌러 install한다. 필자는 이미 깔려있어서 install버튼이 보이지 않는다.
IntelliJ는 vscode와 달리 IDE에 prettier세팅을 넣는게 아니라서, 프로젝트마다 직접 prettier를 깔아줘야 하는 것 같다.
이제 프로젝트에서 prettier를 install한다.
npm i --save-dev prettier
다시 ctrl + shfit + s 를 눌러 setting을 열고 prettier package에 패키지가 설치된 위치를, run for files에는 어떤 확장자의 파일을 대상으로 할 것인지를 설정해준다. 예를들어, {**/*,*}.{js,ts,jsx,tsx,vue} 라고 하면 .vue 파일에서도 prettier가 먹는다.

prettier configuration 파일을 설정해준다.
관련 옵션은 아래를 참고하자.
https://prettier.io/docs/en/options.html
Prettier · Opinionated Code Formatter
Opinionated Code Formatter
prettier.io
이제 Ctrl + Shift + Alt + P를 눌러 사용할 수 있다!!
'Tools' 카테고리의 다른 글
[intellij] (톰캣) 한글깨짐 해결 (0) | 2023.04.19 |
---|---|
[tistory] 티스토리 hELLO 스킨 변경, highlight-line-number추가 (9) | 2023.02.17 |
[IntelliJ] gitbash default로 설정하기 (0) | 2023.01.18 |
[vscode] 탭 사이즈 2칸 설정하기, 탭 사이즈 바뀌지 않게 하기 (0) | 2022.11.10 |
[VScode] java 오류 "Cannot resolve the modulepaths/classpaths automatically, please specify the value in the launch.json." (3) | 2022.09.05 |
VSCode에서 IntelliJ로 갈아타면서 Prettier설정을 다시 하게 되었다...
해보자!
막상 해보니 intelliJ에 기본으로 prettier가 깔려있는 것 같다.
ctrl + shift + s 를 눌러 setting (또는 file>setting) 에 들어간다.
plugin탭에서 prettier를 검색한다

isntall을 눌러 install한다. 필자는 이미 깔려있어서 install버튼이 보이지 않는다.
IntelliJ는 vscode와 달리 IDE에 prettier세팅을 넣는게 아니라서, 프로젝트마다 직접 prettier를 깔아줘야 하는 것 같다.
이제 프로젝트에서 prettier를 install한다.
npm i --save-dev prettier
다시 ctrl + shfit + s 를 눌러 setting을 열고 prettier package에 패키지가 설치된 위치를, run for files에는 어떤 확장자의 파일을 대상으로 할 것인지를 설정해준다. 예를들어, {**/*,*}.{js,ts,jsx,tsx,vue} 라고 하면 .vue 파일에서도 prettier가 먹는다.

prettier configuration 파일을 설정해준다.
관련 옵션은 아래를 참고하자.
https://prettier.io/docs/en/options.html
Prettier · Opinionated Code Formatter
Opinionated Code Formatter
prettier.io
이제 Ctrl + Shift + Alt + P를 눌러 사용할 수 있다!!
'Tools' 카테고리의 다른 글
[intellij] (톰캣) 한글깨짐 해결 (0) | 2023.04.19 |
---|---|
[tistory] 티스토리 hELLO 스킨 변경, highlight-line-number추가 (9) | 2023.02.17 |
[IntelliJ] gitbash default로 설정하기 (0) | 2023.01.18 |
[vscode] 탭 사이즈 2칸 설정하기, 탭 사이즈 바뀌지 않게 하기 (0) | 2022.11.10 |
[VScode] java 오류 "Cannot resolve the modulepaths/classpaths automatically, please specify the value in the launch.json." (3) | 2022.09.05 |