/eslint-typescript-react

A small starter package

Primary LanguageJavaScript

eslint-typescript-react demo

This repository is a small demo on how to use eslint, prettier, commitlint, husky and lint-staged to put together a pre-commit workflow to sanitize your code.

For this demo, we are using airbnb's eslint config with typescript-eslint to maintain a consistent code-style in the codebase.

When used in modern IDEs or script editors, the linting/formatting functions can be enabled on-save to format the current file. Otherwise, the pre-commit and commit-msg git hooks will be used to format all the relevant staged files, and also make sure the commit messages follow conventional commit specifications.

Install

npx install-peerdeps --dev eslint-config-airbnb

npm i -D eclint prettier eslint-config-prettier eslint-plugin-jest eslint-plugin-prettier husky lint-staged @commitlint/cli @commitlint/config-conventional typescript @typescript-eslint/eslint-plugin @typescript-eslint/parser