ljedoc5485
@ljedoc5485
Reviews Written
1
Average Rating
4.0
Posts
Q&A
refreshToken ์ ์ฅ์ ๋ฌธ์
์ง๋ฌธ์ค์ ์ ๊ฐ ์ค์ํ ๋ถ๋ถ์ ๋ฐ๊ฒฌํ์ต๋๋ค ^^ uploadLink์์ credentials์ค์ ์ ์์๋ก์ ๋ฃ์ด์ฃผ์ด์ผ ํ๋๋ฐ.. headers์์ ์์๋ก์ ๋ฃ์๊ฒ์ ํ์ธํ์ต๋๋ค. ํน์๋ ๋ค๋ฅธ ๋ถ๋ค๋ ์ด๋ฐ ๋ฌธ์ ๋ฅผ ๊ฒช์ผ์ค์ง ๋ชฐ๋ผ์ ํด๋น ์ง๋ฌธ์ ๋จ๊ฒจ๋๊ฒ ์ต๋๋ค.
- 0
- 2
- 114
Q&A
eslint์ prettier
์๋ก์ด ๊ฐ์๋ ์ด๋ฏธ ๊ตฌ๋งค๋ฅผ ํ์์ต๋๋ค. ํ์ง๋ง, ํด๋น ๊ฐ์์ eslint์ prettier๊ด๋ จ ๋ด์ฉ์ ์์ด๋ณด์ฌ์ ์ง๋ฌธ๋๋ ธ์ต๋๋ค. ( ์๋ก์ด ๊ฐ์๋ฅผ ์ค๊ฐ๋ถํฐ ๋ฃ๊ธฐ๊ฐ ์ ๋งคํ์ฌ ์์ ๋ฒ์ ์ผ๋ก ๋ฃ๊ณ ์์ต๋๋ค )eslint๋ .mjs๋ฒ์ ์ผ๋ก ํ์ฌ ์๋์ด ์ ๋๊ณ ์์ง๋ง, prettier๋ฅผ ํจ๊ป ์ฐ๋ํ๋ ์กฐํฉ์ด ์ ๋์ง ์์์ต๋๋ค. (๋ค๋ค ์ฐ์๋ jsํํ์ ํ์ผ๋ก ๋ฐ๊พธ์ด์ผ ํ๋๊ฑธ๊น์, eslint ํ์ด์ง๋ ๋ณด๊ณ stackoverflow์ง์๋ ๋ดค์ผ๋ .mjs๋ ํ๋ฌ๊ทธ์ธ ์ ์ฉ๋ฐฉ์์ด๋ผ๊ณ ํ๋๋ฐ prettier์ค์ ์ ๋ํ ๊ฐ์ด๋๋ .js๋ฐฉ์๋ฐ์ ์์์ต๋๋ค.) ๊ฒ์์ผ๋ก ๋ํ๋๋ ์ฝ๋์ ์๋ prettierConfigRecommended ๋ฑ์ ํ๋ฌ๊ทธ์ธ์ ํ์ฌ ์ ์ฉ์ด ์๋๋์ง ์ค์น๊ฐ ์๋์์ด์.chagGPT์๊ฒ ๋ฌผ์ด์ plugin์ ์ค์ ํ๋ yarn lint๋ ๋๋ ํ์ผ์ ์ค๋ฅ๋ฅผ ํ์ํ๋ ๋ฐ์ค๋ฑ์ด ๋ํ๋์ง๋ ์์์ต๋๋ค. gemini์๊ฒ ๋ฌผ์ด์ setting.json์ eslint๋ฅผ ์ถ๊ฐํจ์ผ๋ก์จ( vscode์ settings.json์ eslint: javascript, typescript...์ผ๋ก ์ค์ ์ ํ์ํ์ด์) ๋ฐ์ค ์ค๋ฅํ์๊ฐ ํ์ผ์ ๋์ค๊ธด ํ๋๋ฐ ๋ง๊ฒ ๋์ค๋ ๊ฑด์ง ์์๋ ์์ต๋๋ค. import globals from "globals";import pluginJs from "@eslint/js";import tseslint from "typescript-eslint";import pluginReact from "eslint-plugin-react";import prettierPlugin from "eslint-plugin-prettier";import prettierConfig from "eslint-config-prettier";/** @type {import('eslint').Linter.Config[]} */export default [{files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"],plugins: { prettier: prettierPlugin },},{languageOptions: {globals: globals.browser,// parserOptions: {// project: "./tsconfig.json",// },},},pluginJs.configs.recommended,...tseslint.configs.recommended,pluginReact.configs.flat.recommended,//eslintPluginPrettier.recommended,{rules: {"react/react-in-jsx-scope": "off","prettier/prettier": "error",...prettierConfig.rules,},},];settings.json { "editor.formatOnsave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", "eslint.validate": [ "javascript", "javascriptreact", "typescript", "typescriptreact" ] }ํด๋น ๋ถ๋ถ์ ๋ํด ์กฐ์ธ์ ์ถ๊ฐ๋ก ๋ถํ๋๋ฆฌ๋ฉฐ, ๋ค๋ฅธ ๋ถ๋ค๊ป์๋ ํจ๊ป ๋ ผ์ํ์ฌ ์ฃผ์ จ์ผ๋ฉด ํ๋ ๋ง์์ ๊ธด๊ธ ์ฌ๋ฆฝ๋๋ค.
- 0
- 3
- 333




