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 c37de8fa742..3cf40a6e805 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