We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bdc74ce commit 721a2edCopy full SHA for 721a2ed
1 file changed
crates/biome_js_analyze/src/lint/nursery/no_unnecessary_conditions.rs
@@ -23,22 +23,22 @@ declare_lint_rule! {
23
///
24
/// ### Invalid
25
26
- /// ```ts,expect_diagnostic,ignore
+ /// ```ts
27
/// function head<T>(items: T[]) {
28
/// if (items) { // This check is unnecessary
29
/// return items[0].toUpperCase();
30
/// }
31
32
/// ```
33
34
35
/// function foo(arg: 'bar' | 'baz') {
36
/// if (arg) { // This check is unnecessary
37
38
39
40
41
42
/// function bar(arg: string) {
43
/// return arg?.length; // ?. is unnecessary
44
0 commit comments