From 28dca078d33ba718d0bacb65d1378448c089544f Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Fri, 2 Dec 2022 13:31:26 -0500 Subject: [PATCH] docs: add FAQ entry about running ESLint on transpiled code --- docs/linting/Troubleshooting.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/linting/Troubleshooting.md b/docs/linting/Troubleshooting.md index 38d3bf38e710..98d0eddb8257 100644 --- a/docs/linting/Troubleshooting.md +++ b/docs/linting/Troubleshooting.md @@ -107,6 +107,13 @@ This is to be expected - ESLint rules do not check file extensions on purpose, a If you have some pure JavaScript code that you do not want to apply certain lint rules to, then you can use [ESLint's `overrides` configuration](https://eslint.org/docs/user-guide/configuring#configuration-based-on-glob-patterns) to turn off certain rules, or even change the parser based on glob patterns. +## Should I run ESLint on transpiled output JavaScript files? + +No. + +Source TypeScript files have all the content of output JavaScript files, plus type annotations. +There's no benefit to also linting output JavaScript files. + ## TypeScript should be installed locally Make sure that you have installed TypeScript locally i.e. by using `npm install typescript`, not `npm install -g typescript`, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy