We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
str::ends_with
1 parent d21448b commit f847d0fCopy full SHA for f847d0f
crates/oxc_linter/src/rules/eslint/prefer_object_has_own.rs
@@ -90,7 +90,7 @@ impl Rule for PreferObjectHasOwn {
90
let needs_space = replace_target_span.start > 1
91
&& !ctx
92
.source_range(Span::new(0, replace_target_span.start))
93
- .ends_with(&[' ', '=', '/', '(']);
+ .ends_with([' ', '=', '/', '(']);
94
95
let replacement = if needs_space { " Object.hasOwn" } else { "Object.hasOwn" };
96
fixer.replace(replace_target_span, replacement)
0 commit comments