Skip to content

Commit

Permalink
refactor: rename some rome-ignore to biome-ignore (#795)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conaclos authored Nov 19, 2023
1 parent 708ce96 commit 55be4d4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions crates/biome_formatter/src/comments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ impl<L: Language> CommentPlacement<L> {
pub trait CommentStyle: Default {
type Language: Language;

/// Returns `true` if a comment with the given `text` is a `rome-ignore format:` suppression comment.
/// Returns `true` if a comment with the given `text` is a `biome-ignore format:` suppression comment.
fn is_suppression(_text: &str) -> bool {
false
}
Expand Down Expand Up @@ -917,7 +917,7 @@ impl<L: Language> Comments<L> {
/// # Examples
///
/// ```javascript
/// // rome-ignore format: Reason
/// // biome-ignore format: Reason
/// console.log("Test");
/// ```
///
Expand Down
4 changes: 2 additions & 2 deletions crates/biome_formatter/src/source_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use std::iter::FusedIterator;
///
/// Only having the deleted ranges to resolve the original text of a node isn't sufficient.
/// Resolving the original text of a node is needed when formatting a node as verbatim, either because
/// formatting the node failed because of a syntax error, or formatting is suppressed with a `rome-ignore format:` comment.
/// formatting the node failed because of a syntax error, or formatting is suppressed with a `biome-ignore format:` comment.
///
/// ```text
/// // Source // Transformed
Expand Down Expand Up @@ -458,7 +458,7 @@ impl TransformSourceMapBuilder {
/// Adds a mapping to widen a nodes trimmed range.
///
/// The formatter uses the trimmed range when formatting a node in verbatim either because the node
/// failed to format because of a syntax error or because it's formatting is suppressed with a `rome-ignore format:` comment.
/// failed to format because of a syntax error or because it's formatting is suppressed with a `biome-ignore format:` comment.
///
/// This method adds a mapping to widen a nodes trimmed range to enclose another range instead. This is
/// e.g. useful when removing parentheses around expressions where `(/* comment */ a /* comment */)` because
Expand Down
6 changes: 3 additions & 3 deletions crates/biome_formatter_test/src/test_prettier_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use biome_formatter::FormatOptions;
use biome_parser::AnyParse;

const PRETTIER_IGNORE: &str = "prettier-ignore";
const ROME_IGNORE: &str = "rome-ignore format: prettier ignore";
const BIOME_IGNORE: &str = "biome-ignore format: prettier ignore";

pub struct PrettierTestFile<'a> {
input_file: &'static Path,
Expand All @@ -36,7 +36,7 @@ impl<'a> PrettierTestFile<'a> {
.unwrap_or_else(|err| panic!("failed to read {:?}: {:?}", input_file, err));

let (_, range_start_index, range_end_index) = strip_prettier_placeholders(&mut input_code);
let parse_input = input_code.replace(PRETTIER_IGNORE, ROME_IGNORE);
let parse_input = input_code.replace(PRETTIER_IGNORE, BIOME_IGNORE);

PrettierTestFile {
input_file,
Expand Down Expand Up @@ -169,7 +169,7 @@ where
}
};

let formatted = formatted.replace(ROME_IGNORE, PRETTIER_IGNORE);
let formatted = formatted.replace(BIOME_IGNORE, PRETTIER_IGNORE);

Some(formatted)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_js_formatter/src/utils/jsx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ pub fn is_meaningful_jsx_text(text: &str) -> bool {
///
/// ```javascript
/// <div>
// {/* rome-ignore format: reason */}
// {/* biome-ignore format: reason */}
// <div a={ some} />
// </div>
/// ```
Expand Down

0 comments on commit 55be4d4

Please sign in to comment.