[Typescript] TS2691: import .ts file

TS2691: import .ts file

์ฐธ๊ณ  : https://github.com/microsoft/TypeScript/issues/37582

https://github.com/microsoft/TypeScript/issues/27481

https://github.com/microsoft/TypeScript/issues/39965

์ด ์˜ค๋ฅ˜๋Š” typescript ํŒŒ์ผ์„ ์ฐพ์„ ์ˆ˜ ์—†์–ด์„œ ๋‚˜๋Š” ์˜ค๋ฅ˜์ด๋‹ค.

import A from 'A.tsx';

์œ„์™€ ๊ฐ™์ด ํŒŒ์ผ์„ ๋ถˆ๋Ÿฌ์˜ค๋ฉด, import ์ „์— ts / tsx ํŒŒ์ผ์ด js / jsx ๋กœ ๋ณ€ํ™˜๋˜๊ธฐ ๋•Œ๋ฌธ์— ํ•ด๋‹น ํŒŒ์ผ์„ ์ฐพ์„ ์ˆ˜ ์—†๋‹ค๋Š” ์—๋Ÿฌ๊ฐ€ ๋œฌ๋‹ค.

๋”ฐ๋ผ์„œ, ๋‹จ์ˆœํžˆ ํ™•์žฅ์ž๋ฅผ ๋ถ™์ด์ง€ ์•Š๊ณ  import ํ•ด์˜ค๋Š” ๊ฒƒ์ด ๊ฐ€์žฅ ๊ฐ„๋‹จํ•œ ๋ฐฉ๋ฒ•์ธ๋ฐ ๊ทธ๋ ‡๊ฒŒ ํ•˜๋ฉด eslint์˜ import/extensions rule์— ๊ฑธ๋ฆฐ๋‹ค.

๊ทธ๋ƒฅ ํ•ด๋‹น rule์„ ๋น„ํ™œ์„ฑํ™” ์ฒ˜๋ฆฌํ•ด์คŒ์œผ๋กœ์จ ํ•ด๊ฒฐํ•˜์ž.

import A from 'A';
๋ฐ˜์‘ํ˜•