Skip to content

Commit

Permalink
refactor: style
Browse files Browse the repository at this point in the history
  • Loading branch information
QuiiBz committed Aug 23, 2024
1 parent b7e0fb9 commit 1f3d244
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source: src/rules/unordered_dependencies.rs
expression: issue.message()
---
│ {
- "devDependencies": {keys aren't sorted.
- ...
- }
"devDependencies": {
~ ...keys aren't sorted.
}
│ }
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source: src/rules/unordered_dependencies.rs
expression: issue.message()
---
│ {
- "peerDependencies": {keys aren't sorted.
- ...
- }
"peerDependencies": {
~ ...keys aren't sorted.
}
│ }
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source: src/rules/unordered_dependencies.rs
expression: issue.message()
---
│ {
- "optionalDependencies": {keys aren't sorted.
- ...
- }
"optionalDependencies": {
~ ...keys aren't sorted.
}
│ }
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source: src/rules/unordered_dependencies.rs
expression: issue.message()
---
│ {
- "dependencies": {keys aren't sorted.
- ...
- }
"dependencies": {
~ ...keys aren't sorted.
}
│ }
12 changes: 5 additions & 7 deletions src/rules/unordered_dependencies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,13 @@ impl Issue for UnorderedDependenciesIssue {
fn message(&self) -> String {
format!(
r#" │ {{
{} "{}": {{ {}
{} ...
{} }}
"{}": {{
{} ... {}
}}
│ }}"#,
"-".red(),
self.dependency_kind.to_string().white(),
"← keys aren't sorted.".red(),
"-".red(),
"-".red(),
"~".blue(),
"← keys aren't sorted.".blue(),
)
.bright_black()
.to_string()
Expand Down

0 comments on commit 1f3d244

Please sign in to comment.