Using Lint and Prettier
When you write code, if it is not readable or each developer uses their own coding styles, then the code review might be affected, which can lead to the creation of bugs and issues. This is where Lint and Prettier come in handy.
Understanding the process of linting your code
Linting is an automated process to check your code for programming and styling errors. This process is accomplished by using lint tools, also called linters. When we are dealing with TypeScript, there are two linters available to us: one is called ESLint and the other is TSLint. As TSLint is now deprecated, we will only be working with ESLint.
First, we will initialize a new PCF project. Once the project is initialized, install all the required ESLint packages using the following command in the VS Code integrated terminal as shown in the screenshot:
We are using the --save-dev attribute because these...