From 7f54e81ed0e84e0014e7b3735ea5ab3741e7c850 Mon Sep 17 00:00:00 2001 From: cherryblossom <31467609+cherryblossom000@users.noreply.github.com> Date: Sun, 6 Nov 2022 19:33:37 +1100 Subject: [PATCH] docs: fix formatting in no-new-native-nonconstructor docs --- docs/src/rules/no-new-native-nonconstructor.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/src/rules/no-new-native-nonconstructor.md b/docs/src/rules/no-new-native-nonconstructor.md index 18a73a22bf9..c9b75679a1e 100644 --- a/docs/src/rules/no-new-native-nonconstructor.md +++ b/docs/src/rules/no-new-native-nonconstructor.md @@ -19,6 +19,7 @@ let foo = new Symbol("foo"); // throws a TypeError let result = new BigInt(9007199254740991); +``` Both `new Symbol` and `new BigInt` throw a type error because they are functions and not classes. It is easy to make this mistake by assuming the uppercase letters indicate classes.