diff --git a/crates/oxc_allocator/src/vec2/mod.rs b/crates/oxc_allocator/src/vec2/mod.rs index 57a7a2c775394..f3ed7756c4b75 100644 --- a/crates/oxc_allocator/src/vec2/mod.rs +++ b/crates/oxc_allocator/src/vec2/mod.rs @@ -274,7 +274,7 @@ where /// /// # Indexing /// -/// The `Vec` type allows to access values by index, because it implements the +/// The `Vec` type allows accessing values by index, because it implements the /// [`Index`] trait. An example will be more explicit: /// /// ``` diff --git a/crates/oxc_ast/src/ast/js.rs b/crates/oxc_ast/src/ast/js.rs index af3403baa37a6..c663d8f9434ba 100644 --- a/crates/oxc_ast/src/ast/js.rs +++ b/crates/oxc_ast/src/ast/js.rs @@ -320,7 +320,7 @@ pub struct ArrayExpression<'a> { } inherit_variants! { -/// Represents a element in an array literal. +/// Represents an element in an array literal. /// /// Inherits variants from [`Expression`]. See [`ast` module docs] for explanation of inheritance. /// diff --git a/crates/oxc_ast/src/ast/ts.rs b/crates/oxc_ast/src/ast/ts.rs index 12330a8ab6290..fac1d2248e787 100644 --- a/crates/oxc_ast/src/ast/ts.rs +++ b/crates/oxc_ast/src/ast/ts.rs @@ -212,7 +212,7 @@ pub enum TSLiteral<'a> { /// TypeScript Type /// -/// This is the root-level type for TypeScript types, kind of like [`Expression`] is for +/// This is the root-level type for TypeScript types, similar to how [`Expression`] is for /// expressions. /// /// ## Examples diff --git a/crates/oxc_ast/src/trivia.rs b/crates/oxc_ast/src/trivia.rs index 25e15496948a0..97450d98e5f94 100644 --- a/crates/oxc_ast/src/trivia.rs +++ b/crates/oxc_ast/src/trivia.rs @@ -1,4 +1,4 @@ -//! Trivias such as comments and irregular whitespaces +//! Trivia such as comments and irregular whitespaces #![expect(missing_docs)] // FIXME use std::{ diff --git a/crates/oxc_data_structures/src/inline_string.rs b/crates/oxc_data_structures/src/inline_string.rs index 5f5c2bcfc7278..28c25f60f17cf 100644 --- a/crates/oxc_data_structures/src/inline_string.rs +++ b/crates/oxc_data_structures/src/inline_string.rs @@ -46,7 +46,7 @@ impl InlineString { ); }; - /// Create empty [`InlineString`]. + /// Create an empty [`InlineString`]. #[inline] pub fn new() -> Self { const { Self::ASSERTS }; diff --git a/crates/oxc_data_structures/src/stack/sparse.rs b/crates/oxc_data_structures/src/stack/sparse.rs index 8b2011875b73e..36e0c541574ce 100644 --- a/crates/oxc_data_structures/src/stack/sparse.rs +++ b/crates/oxc_data_structures/src/stack/sparse.rs @@ -23,7 +23,7 @@ use super::{NonEmptyStack, Stack}; /// /// e.g. if `T` is 24 bytes, and 90% of stack entries have no values: /// * `Vec>` is 24 bytes per entry (or 32 bytes if `T` has no niche). -/// * `NonEmptyStack>` is same. +/// * `NonEmptyStack>` is the same. /// * `SparseStack` is 4 bytes per entry. /// /// When the stack grows and reallocates, `SparseStack` has less memory to copy, which is a performance diff --git a/crates/oxc_ecmascript/src/constant_evaluation/mod.rs b/crates/oxc_ecmascript/src/constant_evaluation/mod.rs index f3f07ffcc9569..d455344053e8b 100644 --- a/crates/oxc_ecmascript/src/constant_evaluation/mod.rs +++ b/crates/oxc_ecmascript/src/constant_evaluation/mod.rs @@ -36,7 +36,7 @@ pub trait ConstantEvaluation<'a>: MayHaveSideEffects<'a> { /// /// - target_ty: How the result will be used. /// For example, if the result will be converted to a boolean, - /// passing `Some(ValueType::Boolean)` will allow to utilize that information. + /// passing `Some(ValueType::Boolean)` will allow us to utilize that information. fn evaluate_value_to( &self, ctx: &impl ConstantEvaluationCtx<'a>, diff --git a/crates/oxc_formatter/src/formatter/builders.rs b/crates/oxc_formatter/src/formatter/builders.rs index 44904cde80de3..891dfec22814d 100644 --- a/crates/oxc_formatter/src/formatter/builders.rs +++ b/crates/oxc_formatter/src/formatter/builders.rs @@ -146,7 +146,7 @@ pub const fn empty_line() -> Line { /// /// # Examples /// -/// The line breaks are emitted as spaces if the enclosing `Group` fits on a a single line: +/// The line breaks are emitted as spaces if the enclosing `Group` fits on a single line: /// ``` /// use biome_formatter::{format, format_args}; /// use biome_formatter::prelude::*; @@ -863,7 +863,7 @@ impl std::fmt::Debug for Indent<'_, '_> { /// text("Aligned, and indented"), /// dedent(&format_args![ /// hard_line_break(), -/// text("aligned, not Intended"), +/// text("aligned, not indented"), /// ]), /// ]) /// ] @@ -872,7 +872,7 @@ impl std::fmt::Debug for Indent<'_, '_> { /// ] /// )?; /// assert_eq!( -/// "root\n Indented\n Indented and aligned\n Indented, not aligned\n Aligned\n Aligned, and indented\n aligned, not Intended\nroot level", +/// "root\n Indented\n Indented and aligned\n Indented, not aligned\n Aligned\n Aligned, and indented\n aligned, not indented\nroot level", /// elements.print()?.as_code() /// ); /// # Ok(()) diff --git a/crates/oxc_formatter/src/write/utils/string_utils.rs b/crates/oxc_formatter/src/write/utils/string_utils.rs index 85435d712bbfe..f250fb34c2f48 100644 --- a/crates/oxc_formatter/src/write/utils/string_utils.rs +++ b/crates/oxc_formatter/src/write/utils/string_utils.rs @@ -120,7 +120,7 @@ impl FormatLiteralStringToken<'_> { /// The function determines the preferred quote and alternate quote. /// The preferred quote is the one that comes from the formatter options. The alternate quote is the other one. /// - /// We check how many preferred quotes we have inside the content. If this number is greater then the + /// We check how many preferred quotes we have inside the content. If this number is greater than the /// number alternate quotes that we have inside the content, /// then we swap them, so we can reduce the number of escaped quotes. /// diff --git a/crates/oxc_isolated_declarations/src/types.rs b/crates/oxc_isolated_declarations/src/types.rs index ada38d0b7c9dd..b4dfcdff615f8 100644 --- a/crates/oxc_isolated_declarations/src/types.rs +++ b/crates/oxc_isolated_declarations/src/types.rs @@ -66,7 +66,7 @@ impl<'a> IsolatedDeclarations<'a> { }) } - /// Convert a a computed property key to a static property key when possible + /// Convert a computed property key to a static property key when possible fn transform_property_key(&self, key: &PropertyKey<'a>) -> PropertyKey<'a> { match key { // ["string"] -> string diff --git a/crates/oxc_linter/src/rules/eslint/no_bitwise.rs b/crates/oxc_linter/src/rules/eslint/no_bitwise.rs index 170c2582b6415..f775d1409cccb 100644 --- a/crates/oxc_linter/src/rules/eslint/no_bitwise.rs +++ b/crates/oxc_linter/src/rules/eslint/no_bitwise.rs @@ -73,7 +73,7 @@ declare_oxc_lint!( /// /// `{ type: string[], default: [] }` /// - /// The`allow` option permits the given list of bitwise operators to be used + /// The `allow` option permits the given list of bitwise operators to be used /// as exceptions to this rule. /// /// For example `{ "allow": ["~"] }` would allow the use of the bitwise operator diff --git a/crates/oxc_linter/src/rules/eslint/no_useless_call.rs b/crates/oxc_linter/src/rules/eslint/no_useless_call.rs index 2d195ab78f1cb..52f31136a1f61 100644 --- a/crates/oxc_linter/src/rules/eslint/no_useless_call.rs +++ b/crates/oxc_linter/src/rules/eslint/no_useless_call.rs @@ -35,13 +35,13 @@ declare_oxc_lint!( /// /// Examples of **incorrect** code for this rule: /// ```js - /// // These are same as `foo(1, 2, 3);` + /// // These are the same as `foo(1, 2, 3);` /// foo.call(undefined, 1, 2, 3); /// foo.apply(undefined, [1, 2, 3]); /// foo.call(null, 1, 2, 3); /// foo.apply(null, [1, 2, 3]); /// - /// // These are same as `obj.foo(1, 2, 3);` + /// // These are the same as `obj.foo(1, 2, 3);` /// obj.foo.call(obj, 1, 2, 3); /// obj.foo.apply(obj, [1, 2, 3]); /// ``` diff --git a/crates/oxc_linter/src/rules/jest/no_alias_methods.rs b/crates/oxc_linter/src/rules/jest/no_alias_methods.rs index bb3ea0a090278..d4cd49c31d5e2 100644 --- a/crates/oxc_linter/src/rules/jest/no_alias_methods.rs +++ b/crates/oxc_linter/src/rules/jest/no_alias_methods.rs @@ -26,7 +26,7 @@ declare_oxc_lint!( /// ### Why is this bad? /// /// These aliases are going to be removed in the next major version of Jest - see [jestjs/jest#13164](https://github.com/jestjs/jest/issues/13164) for more. - /// This rule will makes it easier to search for all occurrences of the method within code, and it ensures consistency among the method names used. + /// This rule will make it easier to search for all occurrences of the method within code, and it ensures consistency among the method names used. /// /// ### Examples /// diff --git a/crates/oxc_parser/src/lexer/number.rs b/crates/oxc_parser/src/lexer/number.rs index 70924ec58a49b..d466483b1f33f 100644 --- a/crates/oxc_parser/src/lexer/number.rs +++ b/crates/oxc_parser/src/lexer/number.rs @@ -135,7 +135,7 @@ const fn binary_byte_to_value(b: u8) -> u8 { b & 1 } -/// NOTE: bit shifting here is is safe and much faster than f64::mul_add. +/// NOTE: bit shifting here is safe and much faster than f64::mul_add. /// It's safe because we're sure this number is an integer - if it wasn't, it /// would be a [`Kind::Float`] instead. It's fast because shifting usually takes /// 1 clock cycle on the ALU, while multiplication+addition uses the FPU and is diff --git a/crates/oxc_syntax/src/precedence.rs b/crates/oxc_syntax/src/precedence.rs index 7e8fd13735cdc..16f6108cb791a 100644 --- a/crates/oxc_syntax/src/precedence.rs +++ b/crates/oxc_syntax/src/precedence.rs @@ -8,7 +8,7 @@ pub trait GetPrecedence { /// The following values are meaningful relative position, not their individual values. /// The relative positions are derived from the ECMA Spec by following the grammar bottom up, starting from the "Comma Operator". /// -/// Note: This differs from the the operator precedence table +/// Note: This differs from the operator precedence table /// /// but the relative positions are the same, as both are derived from the ECMA specification. /// diff --git a/crates/oxc_transformer/src/decorator/options.rs b/crates/oxc_transformer/src/decorator/options.rs index 025d2b07cc9ff..81efcbac36d49 100644 --- a/crates/oxc_transformer/src/decorator/options.rs +++ b/crates/oxc_transformer/src/decorator/options.rs @@ -6,7 +6,7 @@ pub struct DecoratorOptions { /// Enables experimental support for decorators, which is a version of decorators that predates the TC39 standardization process. /// /// Decorators are a language feature which hasn’t yet been fully ratified into the JavaScript specification. - /// This means that the implementation version in TypeScript may differ from the implementation in JavaScript when it it decided by TC39. + /// This means that the implementation version in TypeScript may differ from the implementation in JavaScript when it is decided by TC39. /// /// #[serde(skip)] @@ -14,7 +14,7 @@ pub struct DecoratorOptions { /// Enables emitting decorator metadata. /// - /// This option the same as [emitDecoratorMetadata](https://www.typescriptlang.org/tsconfig/#emitDecoratorMetadata) + /// This option is the same as [emitDecoratorMetadata](https://www.typescriptlang.org/tsconfig/#emitDecoratorMetadata) /// in TypeScript, and it only works when `legacy` is true. pub emit_decorator_metadata: bool, } diff --git a/crates/oxc_transformer/src/typescript/options.rs b/crates/oxc_transformer/src/typescript/options.rs index b37a2bbe1fde1..059dcd6a7b8a1 100644 --- a/crates/oxc_transformer/src/typescript/options.rs +++ b/crates/oxc_transformer/src/typescript/options.rs @@ -91,7 +91,7 @@ pub struct TypeScriptOptions { /// Modifies extensions in import and export declarations. /// /// This option, when used together with TypeScript's [`allowImportingTsExtension`](https://www.typescriptlang.org/tsconfig#allowImportingTsExtensions) option, - /// allows to write complete relative specifiers in import declarations while using the same extension used by the source files. + /// allows writing complete relative specifiers in import declarations while using the same extension used by the source files. /// /// When set to `true`, same as [`RewriteExtensionsMode::Rewrite`]. Defaults to `false` (do nothing). #[serde(deserialize_with = "deserialize_rewrite_import_extensions")]