Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JoshuaKGoldberg/linting-typescript-in-2023
Code samples for linting React and TypeScript in 2023. ✨
https://github.com/JoshuaKGoldberg/linting-typescript-in-2023
Last synced: 18 days ago
JSON representation
Code samples for linting React and TypeScript in 2023. ✨
- Host: GitHub
- URL: https://github.com/JoshuaKGoldberg/linting-typescript-in-2023
- Owner: JoshuaKGoldberg
- License: mit
- Created: 2023-02-21T18:50:03.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-21T16:16:43.000Z (over 1 year ago)
- Last Synced: 2024-10-23T08:28:15.137Z (24 days ago)
- Language: TypeScript
- Homepage:
- Size: 259 KB
- Stars: 108
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
Linting TypeScript in 2023 Code
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-)## Usage
First make sure you have [Node installed](https://nodejs.org/en/download) and [Yarn installed](https://yarnpkg.com/getting-started/install).
Then, after [forking the repo from GitHub](https://help.github.com/articles/fork-a-repo):```shell
git clone https://github.com//linting-typescript-in-2023
cd linting-typescript-in-2023
yarn
```### React Site Demo
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.1. _"Violate await-thenable"_: Shows what happens when code violates [`@typescript-eslint/await-thenable`](https://typescript-eslint.io/rules/await-thenable)
2. _"Violate no-floating-promises"_: Shows what happens when code violates [`@typescript-eslint/no-floating-promises`](https://typescript-eslint.io/rules/no-floating-promises)
3. _"Violate no-misused-promises"_: Shows what happens when code violates [`@typescript-eslint/no-misused-promises`](https://typescript-eslint.io/rules/no-misused-promises)
4. _"This may fail, safely"_: It works, no issues!Each of those lint rules are disabled in [`.eslintrc.cjs`](./.eslintrc.cjs).
Uncomment those disables and run `yarn lint` to enable the rules and see their complaints in source code.## Development
See [`.github/CONTRIBUTING.md`](./.github/CONTRIBUTING.md).
Thanks! 💖## Contributors