Git Product home page Git Product logo

typescript-node-yarn-pnp-boilerplate's Introduction

A Typescript, Node.js Boilerplate with Yarn Zero Install

Twitter URL

A boilerplate that works out of the box using Yarn PnP (Zero Install). This project has strong commit and lint enforcement. You can configure any of this to cater to your project, though the default setup is recommended to drive both an efficient dev process and enforce code quality.

Features include:

  • Yarn 3.5.0 with zero install
  • TypeScript 5.0
  • Eslint: Strict eslint that is production ready that enforces:
    • kebab case for files
    • camel case for variables
    • strong typing with no-explicit-any
    • ...and more (See .eslintrc; you can disable things you don't need)
  • Prettier
  • Husky for pre-commit linting enforcement
  • CSpell for spell check on commits
  • Serverless Framework setup with Webpack configured in Subsystem-1/package-a

Getting-started

Clone the repo by click the Use this template button.

Clone and run

git clone https://github.com/pomSense/typescript-node-yarn-pnp-boilerplate
cd typescript-node-yarn-pnp-boilerplate
yarn
yarn husky install
yarn launch

Make sure to setup your VScode typescript version.

Husky

Husky helps run spelling and lint checks upon committing. This makes a much more efficient dev process and catches this prior to linting on .github actions (future feature).

Yarn

When running a yarn command, if you get issues, fail-safe is always to just use yarn run {your command}

Commit rules

Currently, strong commit rules are enforced that are used in top engineering projects. They're located in .commitlintrc.

Commits must start with:

 "merge",
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test"

VS Code - TypeScript Version

If you are getting TypeScript errors in VS code but not in the terminal, that is because when using VS Code, you have to set the typescript version to use the workspace's version.

  • To do this, open the index.ts do cmd+shift+p.
  • Select TypeScript: Select TypeScript Version... (NOTE: This will only show if you do the previous step with a TypeScript file open)
  • Choose Use Workspace Version

Spell check

This project uses spell check. Configuration lives in cspell.yml.

You can add words that are specific to your project in cspell-project-words.txt.

typescript-node-yarn-pnp-boilerplate's People

Contributors

pomsense avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rooted92

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.