๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

Programming/IT

[VScode] Mac VScode ESLint ์ €์žฅ ์‹œ, ์ž๋™ ์ •๋ ฌ, ์ž๋™ ์ˆ˜์ • ์„ค์ •

728x90
๋ฐ˜์‘ํ˜•

VScode์—์„œ ESLint ์ €์žฅ ์‹œ, ์ž๋™์ •๋ ฌ ์„ค์ • ๋ฐฉ๋ฒ•

1. setting.json ์ผœ๊ธฐ

Mac์˜ ๊ฒฝ์šฐ, "Command + P" ๋‹จ์ถ•ํ‚ค๋กœ ํŒŒ์ผ ๊ฒ€์ƒ‰ ์ฐฝ์„ ์—ฐ ํ›„, setting.json(.vscode) ๋ฅผ ์ผœ๊ธฐ

 

2. ESLint ์ €์žฅ ์‹œ, ์ž๋™์ •๋ ฌ ์ฝ”๋“œ ์ถ”๊ฐ€ํ•˜๊ธฐ

"editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit"
  }

์œ„ ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€

 

์‹ค์ œ ์ ์šฉ ๋ชจ์Šต

 

๋ฐ”๋กœ ์ ์šฉ์ด๋˜์ง€ ์•Š๋Š”๋‹ค๋ฉด, VScode๋ฅผ ์žฌ์‹œ์ž‘, VScode ํ™•์žฅ์—์„œ ESLint๋ฅผ "์‚ฌ์šฉ์•ˆํ•จ" > "๋‹ค์‹œ๋กœ๋“œ" > "์‚ฌ์šฉ" ์ˆœ์„œ๋กœ ์žฌ์‹œ์ž‘ ํ•ด๋ณด๊ธฐ

728x90
๋ฐ˜์‘ํ˜•