Razzle: Typescript ํ”Œ๋Ÿฌ๊ทธ์ธ์œผ๋กœ tslint๋ฅผ ๋น„ํ™œ์„ฑํ™”ํ•˜์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ?

์— ๋งŒ๋“  2019๋…„ 02์›” 24์ผ  ยท  4์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: jaredpalmer/razzle

(eslint๋ฅผ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด) tslint๋ฅผ ๋น„ํ™œ์„ฑํ™”ํ•˜๊ณ  ์‹ถ์Šต๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ razzle.config.js ์—์„œ ๋น„ํ™œ์„ฑํ™”ํ•˜๋ฉด ๋‹ค์Œ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

Cannot find "${PATH}/tslint.json" file. Please check webpack and ForkTsCheckerWebpackPlugin configuration.

๋‚ด razzle.config.js ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

module.exports = {
  plugins: [
    {
      name: "typescript",
      useBabel: true,
      useEslint: true,
      forkTsChecker: {
        tsconfig: "./tsconfig.json",
        tslint: false,
        watch: "./src",
        typeCheck: true,
      },
    },
  ],
};

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

@adaam2 ๋‹ค์Œ์€ ๋‚ด ๊ตฌ์„ฑ์˜ ๊ด€๋ จ ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค.

module.exports = {
  plugins: [
    {
      name: "typescript",
      options: {
        useBabel: true,
        useEslint: true,
        forkTsChecker: {
          tsconfig: "./tsconfig.json",
          tslint: undefined,
          watch: "./src",
          typeCheck: true,
        },
      },
    },
  ]
};

์ฐธ๊ณ : ์ฒ˜์Œ์—๋Š” options ํ‚ค๊ฐ€ ๋ˆ„๋ฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๋ชจ๋“  4 ๋Œ“๊ธ€

๋‚ด ๋‚˜์œ โ€” ๋‚ด ๊ตฌ์„ฑ์ด ์ž˜๋ชป ํ˜•์‹ํ™”๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

@Jayphen tslint๊ฐ€ ๋” ์ด์ƒ dep๋กœ ํ•„์š”ํ•˜์ง€ ์•Š๋„๋ก ์ตœ์ข… ์ž‘์—… ๊ตฌ์„ฑ์„ ์ž์„ธํžˆ ์„ค๋ช…ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๊นŒ?

@adaam2 ๋‹ค์Œ์€ ๋‚ด ๊ตฌ์„ฑ์˜ ๊ด€๋ จ ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค.

module.exports = {
  plugins: [
    {
      name: "typescript",
      options: {
        useBabel: true,
        useEslint: true,
        forkTsChecker: {
          tsconfig: "./tsconfig.json",
          tslint: undefined,
          watch: "./src",
          typeCheck: true,
        },
      },
    },
  ]
};

์ฐธ๊ณ : ์ฒ˜์Œ์—๋Š” options ํ‚ค๊ฐ€ ๋ˆ„๋ฝ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

@์ œ์ดํŽœ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค!

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰