Skip to content

Commit

Permalink
chore: new crate and actions enhancements (#4419)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico authored Oct 29, 2024
1 parent 3530f2f commit f543f12
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 9 deletions.
12 changes: 3 additions & 9 deletions crates/biome_js_analyze/src/assists/source/sort_jsx_props.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,12 @@ declare_source_rule! {
///
/// ## Examples
///
/// ### Invalid
///
/// ```js,expect_diagnostic
/// ```js,expect_diff
/// <Hello lastName="Smith" firstName="John" />;
/// ```
///
/// ### Valid
///
/// ```js
/// <Hello firstName="John" lastName="Smith" />;
/// <Hello lastName="Smith" {...this.props} firstName="John" />;
/// <Hello tel={5555555} {...this.props} firstName="John" {...another.props} lastName="Smith" />;
/// ```js,expect_diff
/// <Hello lastName="Smith" firstName="John" {...this.props} tel="0000" address="111 Main Street" {...another.props} lastName="Smith" />;
/// ```
///
pub SortJsxProps {
Expand Down
12 changes: 12 additions & 0 deletions crates/biome_json_analyze/src/assists/source/use_sorted_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ use std::collections::BTreeSet;

declare_source_rule! {
/// Sorts the keys of a JSON object in natural order
///
/// ## Examples
///
/// ```json,expect_diff
/// {
/// "vase": "fancy",
/// "nested": {
/// "omega": "bar",
/// "alpha": "foo"
/// }
/// }
/// ```
pub UseSortedKeys {
version: "1.9.0",
name: "useSortedKeys",
Expand Down
16 changes: 16 additions & 0 deletions crates/biome_lsp_converters/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
<p align="center">
<img alt="Biome - Toolchain of the web" width="400" src="https://raw.githubusercontent.com/biomejs/resources/main/svg/slogan-light-transparent.svg"/>
</p>

<div align="center">

[![Discord chat][discord-badge]][discord-url]
[![cargo version][cargo-badge]][cargo-url]

[discord-badge]: https://badgen.net/discord/online-members/BypW39g6Yc?icon=discord&label=discord&color=green
[discord-url]: https://biomejs.dev/chat
[cargo-badge]: https://badgen.net/crates/v/biome_lsp_converters?&color=green
[cargo-url]: https://crates.io/crates/biome_lsp_converters/

</div>

# `biome_lsp_converters`

The crate contains a set of converters to translate between `lsp-types` and `biome_rowan` (and vice versa) types.
2 changes: 2 additions & 0 deletions crates/biome_lsp_converters/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! The crate contains a set of converters to translate between `lsp-types` and `biome_rowan` (and vice versa) types.
use biome_rowan::TextSize;
use tower_lsp::lsp_types::{ClientCapabilities, PositionEncodingKind};

Expand Down

0 comments on commit f543f12

Please sign in to comment.