DEV Community

loading...
Cover image for Next.js TypeScript Template

Next.js TypeScript Template

huydhoang profile image Huy ・1 min read

Next.js TypeScript Template with Auto Code Formatting in VSCode

Getting Started

git clone https://github.com/huydhoang/next-typescript-template.git
cd next-typescript-template
pnpm dev
Enter fullscreen mode Exit fullscreen mode

pnpm is a cool alternative to yarn or npm as it is faster and can reuse downloaded packages to reduce the size of node_modules.

If you use yarn

yarn dev
Enter fullscreen mode Exit fullscreen mode

or npm

npm run dev
Enter fullscreen mode Exit fullscreen mode

Auto Code Formatting

Auto Code Formatting for TypeScript was setup using ESLint and Prettier in VSCode.
Simply turn on Editor: Format On Save feature within VSCode and let the magic happen.

File > Preferences > Search 'Format On Save'

https://github.com/huydhoang/next-typescript-template

Feel free to share and comment! :)

Discussion (0)

pic
Editor guide