Demo app for linting React and TypeScript with typescript-eslint, formed from my template-typescript-node-package. ✨
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
First make sure you have Node installed and Yarn installed. Then, after forking the repo from GitHub:
git clone https://github.com/<your-name-here>/linting-typescript-in-2023
cd linting-typescript-in-2023
yarn
To start a Next dev server, yarn dev
.
It displays a page with four buttons, each of which is meant to set the page background to a random color.
- "Violate await-thenable": Shows what happens when code violates
@typescript-eslint/await-thenable
- "Violate no-floating-promises": Shows what happens when code violates
@typescript-eslint/no-floating-promises
- "Violate no-misused-promises": Shows what happens when code violates
@typescript-eslint/no-misused-promises
- "This may fail, safely": It works, no issues!
Each of those lint rules are disabled in .eslintrc.cjs
.
Uncomment those disables and run yarn lint
to enable the rules and see their complaints in source code.
See .github/CONTRIBUTING.md
.
Thanks! 💖
Vim 📖 |
János Orcsik 📖 |