From 7b166b31c3d5f465a26c3080f05803abd4a4c5a2 Mon Sep 17 00:00:00 2001 From: Sysix Date: Sat, 28 Dec 2024 15:04:32 +0100 Subject: [PATCH] feat(linter): add rule eslint/new-cap --- crates/oxc_linter/src/rules/eslint/new_cap.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/oxc_linter/src/rules/eslint/new_cap.rs b/crates/oxc_linter/src/rules/eslint/new_cap.rs index 34d08f2fb228e..26014a4a19ffe 100644 --- a/crates/oxc_linter/src/rules/eslint/new_cap.rs +++ b/crates/oxc_linter/src/rules/eslint/new_cap.rs @@ -151,6 +151,11 @@ declare_oxc_lint!( /// Many style guides recommend following this pattern /// to more easily determine which functions are to be used as constructors. /// + /// **Warning**: + /// The option `newIsCapExceptionPattern` and `capIsNewExceptionPattern` are implemented with + /// the [rust regex syntax](https://docs.rs/regex/latest/regex/). Many JavaScript features + /// are not supported (Lookahead, Lookbehinds, ...). + /// /// ### Examples /// /// Examples of **incorrect** code for this rule: