From c7eafdb54bb98801feedb98659d780fdb1eafa8d Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Fri, 26 Sep 2025 10:48:43 -0400 Subject: [PATCH] docs: switch outdated `overrides` FAQ to `files` --- docs/troubleshooting/faqs/JavaScript.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/troubleshooting/faqs/JavaScript.mdx b/docs/troubleshooting/faqs/JavaScript.mdx index ac445281df3f..00e4acaf726c 100644 --- a/docs/troubleshooting/faqs/JavaScript.mdx +++ b/docs/troubleshooting/faqs/JavaScript.mdx @@ -11,7 +11,10 @@ import TabItem from '@theme/TabItem'; This is to be expected - ESLint rules do not check file extensions on purpose, as it causes issues in environments that use non-standard extensions (for example, a `.vue` and a `.md` file can both contain TypeScript code to be linted). -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. +If you have some pure JavaScript code that you do not want to apply certain lint rules to, then you can use [ESLint's `files` configuration](https://eslint.org/docs/latest/use/configure/configuration-files#specifying-files-and-ignores) to either: + +- (recommended) only enable TypeScript-specific rules on TypeScript file extensions +- turn off TypeScript-specific rules on JavaScript-only file extensions ## Should I run ESLint on transpiled output JavaScript files?