Setup ESLint in TypeScript project
18 March 2022 (Updated 6 May 2024)
Install packages (remove eslint-config-prettier
if not using prettier):
Init config file:
Edit config file:
Add NPM script:
Run ESLint:
Setup eslint-plugin-unused-imports
Install package:
Add to plugins
(keep other entries) in your ESLint config:
Add the following to the rules
field:
Setup eslint-plugin-simple-import-sort
Install package:
npm install --save-dev eslint-plugin-simple-import-sort
Configure .eslintrc
:
Tagged:
JavaScript tooling
Thanks for your comment . Once it's approved, it will appear here.
Leave a comment