DEV Community

Discussion on: My takes on EsLint and Prettier against TypeScript

Collapse
 
ndohjapan profile image
Joel Ndoh

I completely understand your point of view and agree that TypeScript provides a stronger level of type-safety than ESLint and Prettier. However, my argument is that for small projects, especially those that do not require the full features of TypeScript, ESLint and Prettier can provide enough type-safety and at the same time save time and effort.

To clarify, ESLint can catch a lot of common mistakes during development, such as undeclared variables, misspelled variable names, and other potential errors that can lead to runtime issues. And by using Prettier, code formatting is consistent and errors caused by formatting are reduced. This can be helpful in maintaining a clean and organized codebase.

Of course, TypeScript offers more advanced features for type-safety, but it also requires a learning curve and may not always be necessary for small projects. It ultimately comes down to the specific needs of each project and the resources available.

In terms of configurations and rules, there are various plugins and packages available for ESLint that can add type-safety checks to the code. For example, the "@typescript-eslint" plugin for ESLint allows developers to leverage TypeScript syntax for their ESLint configurations. This provides a level of type-checking that is not available with the basic ESLint configuration.

I hope you get what I mean šŸ˜‰