From 56de4c4d78fa00ae369e2f8c6f686f7e42fe432a Mon Sep 17 00:00:00 2001 From: L Lllvvuu Date: Tue, 19 Mar 2024 16:23:32 -0700 Subject: [PATCH] docs(restrict-template-expressions): remove mention of numbers being allowed In the `recommended` config, numbers are allowed, but so are several other types. In the `strict` config, numbers are not allowed. Either way, "string and number" might not be the right documentation for what's allowed. --- .../eslint-plugin/docs/rules/restrict-template-expressions.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/eslint-plugin/docs/rules/restrict-template-expressions.mdx b/packages/eslint-plugin/docs/rules/restrict-template-expressions.mdx index c37de8fa7429..3cf40a6e805d 100644 --- a/packages/eslint-plugin/docs/rules/restrict-template-expressions.mdx +++ b/packages/eslint-plugin/docs/rules/restrict-template-expressions.mdx @@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'; JavaScript automatically [converts an object to a string](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#string_coercion) in a string context, such as when concatenating it with a string using `+` or embedding it in a template literal using `${}`. The default `toString()` method of objects returns `"[object Object]"`, which is often not what was intended. -This rule reports on values used in a template literal string that aren't strings, numbers, or BigInts, optionally allowing other data types that provide useful stringification results. +This rule reports on values used in a template literal string that aren't strings, optionally allowing other data types that provide useful stringification results. :::note 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