/lint-everything

use prettier & eslint & typescript & vscode.

Primary LanguageJavaScript

What should you prepare for linting TypeScript

You use VsCode to dev? Well, let me to tell you how to configure this lint function in VsCode.

First thing you must know is that VsCode has extensions to highlight the errors/warnings while you're coding. ESList is one of them. Then the another is Prettier - Code formatter. And the third one is EditorConfig for Vs Code.

Just install them!

To lint Typescript, you may think you need a TSLint extension. No! ESLint & Prettier can cover everything NOW!

Secondly, you should install some npm packages. Look below! 👇

"devDependencies": {
	"@typescript-eslint/eslint-plugin": "^2.27.0",
	"@typescript-eslint/parser": "^2.27.0",
	"eslint": "^6.8.0",
	"eslint-config-prettier": "^6.10.1",
	"eslint-plugin-prettier": "^3.1.2",
	"prettier": "^2.0.4",
	"typescript": "^3.8.3"
}

What are them for? Some gives recommened rules and some gives a parser while fixing code. And typescript is a language support.

...

Sorry, I'm hungry now.