Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaReiser committed Aug 17, 2022
1 parent f2665fe commit 1740c40
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 120 deletions.
2 changes: 2 additions & 0 deletions crates/rome_js_formatter/src/js/classes/extends_clause.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use crate::prelude::*;

use crate::parentheses::resolve_parent;
use rome_formatter::{format_args, write};
use rome_js_syntax::JsExtendsClauseFields;
use rome_js_syntax::JsSyntaxKind::JS_ASSIGNMENT_EXPRESSION;
Expand Down Expand Up @@ -31,6 +32,7 @@ impl FormatNodeRule<JsExtendsClause> for FormatJsExtendsClause {
if node
.syntax()
.parent()
.and_then(|node| resolve_parent(&node))
.map_or(false, |p| p.kind() == JS_ASSIGNMENT_EXPRESSION)
{
if super_class.syntax().has_leading_comments() || has_trailing_comments {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
source: crates/rome_js_formatter/tests/spec_test.rs
assertion_line: 257
expression: class.js
---
# Input
Expand Down Expand Up @@ -135,16 +134,13 @@ x = class {};

x = class foo extends Boar {};

x = class aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa extends bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb {};
x = class aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa extends (
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
) {};

export class Task {
constructor(script, duration, threadCount, ...args) {
this.args = args;
}
}


## Lines exceeding width of 80 characters

53: x = class aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa extends bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb {};

This file was deleted.

0 comments on commit 1740c40

Please sign in to comment.