Front-End

How to set up auto-fix on save by using the project’s Eslint config with VS Code

This is a quick instruction to set up auto-fix on save by using the project’s eslint config with VS Code. It works for both TS and JS. 1. Install ESLint plugin for VS Code. 2. Add config to VS code Go to Code -> Preference -> Settings (or press cmd …

Front-End

How to configure debugger when running jest for React unit tests with VS Code

We can debug the jest test with console.log (make sure to remove the –silent option). But, attaching a debugger and stepping through the tests sometimes may help us to troubleshoot quicker under certain circumstances. 1. Install Jest Plugin Install Jest plugin. 2. Configure Press cmd + shift + p. Find …

Node.js

How to Auto Fix Lint on Save with VS Code TSLint Extension

Wouldn’t you rather spend time coding than fixing pesky lint errors? The best time saver for developing TypeScript apps is auto-fixing lint on save. This is a quick instruction to endow this magical power to your VS code. Steps (1) Install tslint in your project. npm i –save-dev tslint (2) …