File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
crates/oxc_linter/src/rules/oxc Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -43,16 +43,20 @@ impl std::ops::Deref for NoOptionalChaining {
4343declare_oxc_lint ! (
4444 /// ### What it does
4545 ///
46- /// Disallow [optional chaining](https://github.com/tc39/proposal-optional-chaining ).
46+ /// Disallow [optional chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining ).
4747 ///
4848 /// ### Why is this bad?
4949 ///
50- /// Optional chaining is a relatively new JavaScript feature that may not be
51- /// supported in older environments. In some cases, transpiling optional
52- /// chaining can result in verbose helper code that impacts bundle size or
53- /// performance. This rule is useful when you need to maintain compatibility
54- /// with older JavaScript targets or want to avoid the overhead of transpiled
55- /// optional chaining.
50+ /// You may want to use this rule if you need to maintain compatibility with older environments.
51+ /// However, optional chaining has been supported in all major browsers since 2020 and is
52+ /// generally safe to use today.
53+ ///
54+ /// In some cases, transpiling optional chaining can result in verbose helper code
55+ /// that impacts bundle size and performance. This rule is useful when you need to
56+ /// avoid the overhead of transpiled optional chaining. This is only relevant if you
57+ /// are polyfilling to support browsers from pre-2020.
58+ ///
59+ /// In most codebases at this point, you should not use this rule.
5660 ///
5761 /// ### Examples
5862 ///
You can’t perform that action at this time.
0 commit comments