repo
stringlengths
6
65
file_url
stringlengths
81
311
file_path
stringlengths
6
227
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:31:58
2026-01-04 20:25:31
truncated
bool
2 classes
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/src/frameworks/vue/vue_component.rs
crates/biome_js_analyze/src/frameworks/vue/vue_component.rs
use crate::frameworks::vue::vue_call::{is_vue_api_reference, is_vue_compiler_macro_call}; use crate::services::semantic::Semantic; use biome_js_semantic::SemanticModel; use biome_js_syntax::{ AnyJsArrayBindingPatternElement, AnyJsArrayElement, AnyJsBinding, AnyJsBindingPattern, AnyJsCombinedSpecifier, AnyJsExpr...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/src/frameworks/vue/mod.rs
crates/biome_js_analyze/src/frameworks/vue/mod.rs
pub(crate) mod vue_call; pub(crate) mod vue_component;
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/src/frameworks/vue/vue_call.rs
crates/biome_js_analyze/src/frameworks/vue/vue_call.rs
use crate::frameworks::is_framework_api_reference; use biome_js_semantic::SemanticModel; use biome_js_syntax::{AnyJsExpression, JsCallExpression}; /// Given a Vue compiler macro, checks if the given call expression is a call to that macro. pub fn is_vue_compiler_macro_call( call: &JsCallExpression, model: &Sem...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/src/frameworks/vue/vue_component/component_name.rs
crates/biome_js_analyze/src/frameworks/vue/vue_component/component_name.rs
use std::ops::Deref; use biome_analyze::QueryMatch; use super::*; impl AnyVueComponent { /// Try to infer the component's name from its definition. pub fn component_name(&self) -> Option<(TokenText, TextRange)> { let object_expression = match self { Self::OptionsApi(c) => c ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/src/syntax/correctness.rs
crates/biome_js_analyze/src/syntax/correctness.rs
//! Generated file, do not edit by hand, see `xtask/codegen` //! Generated file, do not edit by hand, see `xtask/codegen` use biome_analyze::declare_syntax_group; pub mod no_duplicate_private_class_members; pub mod no_initializer_with_definite; pub mod no_super_without_extends; pub mod no_type_only_import_attributes;...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/src/syntax/correctness/no_super_without_extends.rs
crates/biome_js_analyze/src/syntax/correctness/no_super_without_extends.rs
use biome_analyze::context::RuleContext; use biome_analyze::{Ast, Rule, RuleDiagnostic, declare_syntax_rule}; use biome_console::markup; use biome_js_syntax::{JsClassDeclaration, JsClassExpression, JsSuperExpression}; use biome_rowan::AstNode; declare_syntax_rule! { /// Catch a `SyntaxError` when writing calling `...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/src/syntax/correctness/no_type_only_import_attributes.rs
crates/biome_js_analyze/src/syntax/correctness/no_type_only_import_attributes.rs
use biome_analyze::{Rule, RuleDiagnostic, context::RuleContext, declare_syntax_rule}; use biome_console::markup; use biome_js_syntax::{ AnyJsExportClause, AnyJsImportClause, AnyJsModuleItem, JsFileSource, JsNamedImportSpecifiers, JsSyntaxToken, }; use biome_rowan::{AstNode, AstSeparatedList, TextRange}; use cr...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/src/syntax/correctness/no_initializer_with_definite.rs
crates/biome_js_analyze/src/syntax/correctness/no_initializer_with_definite.rs
use biome_analyze::{Ast, Rule, RuleDiagnostic, context::RuleContext, declare_syntax_rule}; use biome_js_syntax::{JsVariableDeclarator, TextRange, TsDefiniteVariableAnnotation}; use biome_rowan::AstNode; declare_syntax_rule! { /// Disallow initializing a variable with a definite assertion to prevent `SyntaxError`. ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/src/syntax/correctness/no_duplicate_private_class_members.rs
crates/biome_js_analyze/src/syntax/correctness/no_duplicate_private_class_members.rs
use biome_analyze::{Ast, Rule, RuleDiagnostic, context::RuleContext, declare_syntax_rule}; use biome_js_syntax::{AnyJsClassMember, JsClassMemberList, TextRange}; use biome_rowan::AstNode; use rustc_hash::{FxHashMap, FxHashSet}; declare_syntax_rule! { /// Catch a `SyntaxError` when defining duplicate private class ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/src/react/hooks.rs
crates/biome_js_analyze/src/react/hooks.rs
use crate::react::{ReactLibrary, is_react_call_api}; use biome_js_semantic::{Capture, Closure, ClosureExtensions, SemanticModel}; use biome_js_syntax::binding_ext::AnyJsBindingDeclaration; use biome_js_syntax::{ AnyJsExpression, AnyJsMemberExpression, JsArrowFunctionExpression, JsCallExpression, JsFunctionExpre...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/src/react/components.rs
crates/biome_js_analyze/src/react/components.rs
use biome_js_syntax::export_ext::{AnyJsExported, ExportedItem}; use biome_js_syntax::{ AnyJsBinding, AnyJsExpression, JsArrowFunctionExpression, JsAssignmentExpression, JsCallArgumentList, JsCallArguments, JsCallExpression, JsClassDeclaration, JsClassExportDefaultDeclaration, JsExportDefaultExpressionClause...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/tests/quick_test.rs
crates/biome_js_analyze/tests/quick_test.rs
use biome_analyze::options::JsxRuntime; use biome_analyze::{ AnalysisFilter, AnalyzerConfiguration, AnalyzerOptions, ControlFlow, Never, RuleFilter, }; use biome_deserialize::TextRange; use biome_diagnostics::{Diagnostic, DiagnosticExt, Severity, print_diagnostic_to_string}; use biome_fs::TemporaryFs; use biome_js_...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/tests/spec_tests.rs
crates/biome_js_analyze/tests/spec_tests.rs
use biome_analyze::{ AnalysisFilter, AnalyzerAction, AnalyzerPluginSlice, ControlFlow, Never, Queryable, RegistryVisitor, Rule, RuleDomain, RuleFilter, RuleGroup, }; use biome_diagnostics::advice::CodeSuggestionAdvice; use biome_fs::OsFileSystem; use biome_js_analyze::JsAnalyzerServices; use biome_js_parser::{J...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/benches/use_sorted_classes_parser.rs
crates/biome_js_analyze/benches/use_sorted_classes_parser.rs
use biome_js_analyze::lint::nursery::use_sorted_classes::class_lexer::tokenize_class; use criterion::{BenchmarkId, Criterion, Throughput, black_box, criterion_group, criterion_main}; #[cfg(target_os = "windows")] #[global_allocator] static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc; #[cfg(all( any(target_os ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_js_analyze/benches/js_analyzer.rs
crates/biome_js_analyze/benches/js_analyzer.rs
use biome_analyze::options::JsxRuntime; use biome_analyze::{ AnalysisFilter, AnalyzerConfiguration, AnalyzerOptions, ControlFlow, Never, RuleCategoriesBuilder, }; use biome_js_parser::JsParserOptions; use biome_js_syntax::JsFileSource; use biome_test_utils::BenchCase; use criterion::{BenchmarkId, Criterion, bla...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_syntax/src/string_value_ext.rs
crates/biome_graphql_syntax/src/string_value_ext.rs
use crate::{GraphqlStringValue, inner_string_text}; use biome_rowan::{SyntaxResult, TokenText}; impl GraphqlStringValue { /// Check if the string is a block string /// Block strings are enclosed by triple quotes /// and can span multiple lines /// Example: /// ```graphql /// """ /// This is...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_syntax/src/lib.rs
crates/biome_graphql_syntax/src/lib.rs
//! A crate for generated Syntax node definitions and utility macros. //! Both rome_grit_lexer and biome_grit_parser rely on these definitions, therefore //! they are wrapped in this crate to prevent cyclic dependencies #![deny(clippy::use_self)] #[macro_use] mod generated; mod file_source; pub mod string_value_ext; ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_syntax/src/syntax_node.rs
crates/biome_graphql_syntax/src/syntax_node.rs
//! This module defines the Concrete Syntax Tree used by Biome. //! //! The tree is entirely lossless, whitespace, comments, and errors are preserved. //! It also provides traversal methods including parent, children, and siblings of nodes. //! //! This is a simple wrapper around the `rowan` crate which does most of th...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_syntax/src/file_source.rs
crates/biome_graphql_syntax/src/file_source.rs
use biome_rowan::FileSourceError; use biome_string_case::StrLikeExtension; use camino::Utf8Path; #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] #[derive( Debug, Clone, Default, Copy, Eq, PartialEq, Hash, serde::Serialize, serde::Deserialize, )] #[serde(rename_all = "camelCase")] pub struct GraphqlFi...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_syntax/src/generated.rs
crates/biome_graphql_syntax/src/generated.rs
#[rustfmt::skip] pub(super) mod nodes; #[rustfmt::skip] pub(super) mod nodes_mut; #[rustfmt::skip] pub mod macros; #[macro_use] pub mod kind; pub use kind::*; pub use nodes::*;
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_syntax/src/generated/nodes_mut.rs
crates/biome_graphql_syntax/src/generated/nodes_mut.rs
//! Generated file, do not edit by hand, see `xtask/codegen` use crate::{GraphqlSyntaxToken as SyntaxToken, generated::nodes::*}; use biome_rowan::AstNode; use std::iter::once; impl GraphqlAlias { pub fn with_value(self, element: GraphqlLiteralName) -> Self { Self::unwrap_cast( self.syntax ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_syntax/src/generated/kind.rs
crates/biome_graphql_syntax/src/generated/kind.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(bad_style, missing_docs, unreachable_pub)] #[doc = r" The kind of syntax node, e.g. `IDENT`, `FUNCTION_KW`, or `FOR_STMT`."] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] #[repr(u16)] pub enum GraphqlSyntaxKind { #[doc(hidd...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_syntax/src/generated/macros.rs
crates/biome_graphql_syntax/src/generated/macros.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #[doc = r" Reconstruct an AstNode from a SyntaxNode"] #[doc = r""] #[doc = r" This macros performs a match over the [kind](biome_rowan::SyntaxNode::kind)"] #[doc = r" of the provided [biome_rowan::SyntaxNode] and constructs the appropriate"] #[doc = r" AstNo...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_graphql_syntax/src/generated/nodes.rs
crates/biome_graphql_syntax/src/generated/nodes.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(dead_code)] #![allow(unused)] use crate::{ GraphqlLanguage as Language, GraphqlSyntaxElement as SyntaxElement, GraphqlSyntaxElementChildren as SyntaxElementChildren, GraphqlSyntaxKind::{self as SyntaxKind, *}, GraphqlSyntaxList as Sy...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp_converters/src/to_proto.rs
crates/biome_lsp_converters/src/to_proto.rs
use crate::PositionEncoding; use anyhow::{Context, Result}; use biome_line_index::LineIndex; use biome_text_size::{TextRange, TextSize}; use tower_lsp_server::ls_types::{Position, Range}; /// The function is used to convert TextSize to a LSP position. pub fn position( line_index: &LineIndex, offset: TextSize, ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp_converters/src/lib.rs
crates/biome_lsp_converters/src/lib.rs
//! The crate contains a set of converters to translate between `lsp-types` and `biome_rowan` (and vice versa) types. #![deny(clippy::use_self)] use biome_line_index::WideEncoding; use tower_lsp_server::ls_types::{ClientCapabilities, PositionEncodingKind}; pub mod from_proto; pub mod to_proto; pub fn negotiated_enc...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_lsp_converters/src/from_proto.rs
crates/biome_lsp_converters/src/from_proto.rs
use crate::PositionEncoding; use anyhow::{Context, Result}; use biome_line_index::{LineCol, LineIndex, WideLineCol}; use biome_text_size::{TextRange, TextSize}; use tower_lsp_server::ls_types::{Position, Range}; /// The function is used to convert a LSP position to TextSize. pub fn offset( line_index: &LineIndex, ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_html_syntax/src/attr_ext.rs
crates/biome_html_syntax/src/attr_ext.rs
use crate::{ AnyHtmlAttribute, AnyHtmlAttributeInitializer, HtmlAttribute, HtmlAttributeList, HtmlAttributeName, inner_string_text, }; use biome_rowan::{AstNodeList, Text, TokenText}; impl AnyHtmlAttributeInitializer { /// Returns the string value of the attribute, if available, without quotes. pub fn ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_html_syntax/src/lib.rs
crates/biome_html_syntax/src/lib.rs
#![deny(clippy::use_self)] #[macro_use] mod attr_ext; pub mod element_ext; mod file_source; mod generated; mod script_type; mod string_ext; mod syntax_node; pub use biome_rowan::{TextLen, TextRange, TextSize, TokenAtOffset, TriviaPieceKind, WalkEvent}; pub use file_source::{HtmlFileSource, HtmlTextExpressions, HtmlVa...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_html_syntax/src/syntax_node.rs
crates/biome_html_syntax/src/syntax_node.rs
//! This module defines the Concrete Syntax Tree used by Biome. //! //! The tree is entirely lossless, whitespace, comments, and errors are preserved. //! It also provides traversal methods including parent, children, and siblings of nodes. //! //! This is a simple wrapper around the `rowan` crate which does most of th...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_html_syntax/src/file_source.rs
crates/biome_html_syntax/src/file_source.rs
use biome_rowan::FileSourceError; use biome_string_case::StrLikeExtension; use camino::Utf8Path; #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] #[derive( Debug, Clone, Default, Copy, Eq, PartialEq, Hash, serde::Serialize, serde::Deserialize, )] pub struct HtmlFileSource { variant: HtmlVariant, }...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_html_syntax/src/string_ext.rs
crates/biome_html_syntax/src/string_ext.rs
use crate::{HtmlString, inner_string_text}; use biome_rowan::{SyntaxResult, TokenText}; impl HtmlString { /// Returns the inner text of a string not including the quotes. /// /// ## Examples /// /// ``` /// use biome_html_factory::make; /// use biome_rowan::TriviaPieceKind; /// ///l...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_html_syntax/src/element_ext.rs
crates/biome_html_syntax/src/element_ext.rs
use crate::{ AnyHtmlElement, AstroEmbeddedContent, HtmlAttribute, HtmlAttributeList, HtmlElement, HtmlEmbeddedContent, HtmlOpeningElement, HtmlSelfClosingElement, HtmlSyntaxToken, HtmlTagName, ScriptType, inner_string_text, }; use biome_rowan::{AstNodeList, SyntaxResult, TokenText, declare_node_union}; ///...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_html_syntax/src/script_type.rs
crates/biome_html_syntax/src/script_type.rs
/// Determines the kind of script that is contained in a `<script>` tag. #[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub enum ScriptType { /// Used for any `<script>` tag that either has no `type` attribute, or that /// has a `type` attribute with a supported JavaScript MIME type. #[default] C...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_html_syntax/src/generated.rs
crates/biome_html_syntax/src/generated.rs
#[rustfmt::skip] pub(super) mod nodes; #[rustfmt::skip] pub mod macros; #[macro_use] pub mod kind; pub use kind::*; pub use nodes::*;
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_html_syntax/src/generated/nodes_mut.rs
crates/biome_html_syntax/src/generated/nodes_mut.rs
//! Generated file, do not edit by hand, see `xtask/codegen` use crate::{HtmlSyntaxToken as SyntaxToken, generated::nodes::*}; use biome_rowan::AstNode; use std::iter::once; impl AstroEmbeddedContent { pub fn with_content_token(self, element: Option<SyntaxToken>) -> Self { Self::unwrap_cast( se...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_html_syntax/src/generated/kind.rs
crates/biome_html_syntax/src/generated/kind.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(bad_style, missing_docs, unreachable_pub)] #[doc = r" The kind of syntax node, e.g. `IDENT`, `FUNCTION_KW`, or `FOR_STMT`."] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] #[repr(u16)] pub enum HtmlSyntaxKind { #[doc(hidden)...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_html_syntax/src/generated/macros.rs
crates/biome_html_syntax/src/generated/macros.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #[doc = r" Reconstruct an AstNode from a SyntaxNode"] #[doc = r""] #[doc = r" This macros performs a match over the [kind](biome_rowan::SyntaxNode::kind)"] #[doc = r" of the provided [biome_rowan::SyntaxNode] and constructs the appropriate"] #[doc = r" AstNo...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_html_syntax/src/generated/nodes.rs
crates/biome_html_syntax/src/generated/nodes.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(dead_code)] #![allow(unused)] use crate::{ HtmlLanguage as Language, HtmlSyntaxElement as SyntaxElement, HtmlSyntaxElementChildren as SyntaxElementChildren, HtmlSyntaxKind::{self as SyntaxKind, *}, HtmlSyntaxList as SyntaxList, HtmlS...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_text_size/src/lib.rs
crates/biome_text_size/src/lib.rs
//! Newtypes for working with text sizes/ranges in a more type-safe manner. //! //! This library can help with two things: //! * Reducing storage requirements for offsets and ranges, under the //! assumption that 32 bits is enough. //! * Providing standard vocabulary types for applications where text ranges //!...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_text_size/src/range.rs
crates/biome_text_size/src/range.rs
use cmp::Ordering; use { crate::TextSize, std::{ cmp, convert::TryFrom, fmt, ops::{Add, AddAssign, Bound, Index, IndexMut, Range, RangeBounds, Sub, SubAssign}, }, }; /// A range in text, represented as a pair of [`TextSize`][struct@TextSize]. /// /// It is a logic error for...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_text_size/src/traits.rs
crates/biome_text_size/src/traits.rs
use {crate::TextSize, std::convert::TryInto}; use priv_in_pub::Sealed; mod priv_in_pub { pub trait Sealed {} } /// Primitives with a textual length that can be passed to [`TextSize::of`]. pub trait TextLen: Copy + Sealed { /// The textual length of this primitive. fn text_len(self) -> TextSize; } impl Se...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_text_size/src/schemars_impls.rs
crates/biome_text_size/src/schemars_impls.rs
//! This module implements the [JsonSchema] trait from the [schemars] crate for //! [TextSize] and [TextRange] if the `schemars` feature is enabled. This trait //! exposes meta-information on how a given type is serialized and deserialized //! using `serde`, and is currently used to generate autocomplete information //...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_text_size/src/serde_impls.rs
crates/biome_text_size/src/serde_impls.rs
use { crate::{TextRange, TextSize}, serde::{Deserialize, Deserializer, Serialize, Serializer, de}, }; impl Serialize for TextSize { fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error> where S: Serializer, { self.raw.serialize(serializer) } } impl<'de> Deserialize<'...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_text_size/src/size.rs
crates/biome_text_size/src/size.rs
use { crate::TextLen, std::{ convert::TryFrom, fmt, iter, num::TryFromIntError, ops::{Add, AddAssign, Sub, SubAssign}, }, }; /// A measure of text length. Also, equivalently, an index into text. /// /// This is a UTF-8 bytes offset stored as `u32`, but /// most clients shoul...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_text_size/tests/serde.rs
crates/biome_text_size/tests/serde.rs
use {biome_text_size::*, serde_test::*, std::ops}; fn size(x: u32) -> TextSize { TextSize::from(x) } fn range(x: ops::Range<u32>) -> TextRange { TextRange::new(x.start.into(), x.end.into()) } #[test] fn size_serialization() { assert_tokens(&size(00), &[Token::U32(00)]); assert_tokens(&size(10), &[Tok...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_text_size/tests/contructors.rs
crates/biome_text_size/tests/contructors.rs
use biome_text_size::TextSize; #[derive(Copy, Clone)] struct BadRope<'a>(&'a [&'a str]); impl BadRope<'_> { fn text_len(self) -> TextSize { self.0.iter().copied().map(TextSize::of).sum() } } #[test] fn main() { let x: char = 'c'; let _ = TextSize::of(x); let x: &str = "hello"; let _ ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_text_size/tests/main.rs
crates/biome_text_size/tests/main.rs
use {biome_text_size::*, std::ops}; fn size(x: u32) -> TextSize { TextSize::from(x) } fn range(x: ops::Range<u32>) -> TextRange { TextRange::new(x.start.into(), x.end.into()) } #[test] fn sum() { let xs: Vec<TextSize> = vec![size(0), size(1), size(2)]; assert_eq!(xs.iter().sum::<TextSize>(), size(3))...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_text_size/tests/indexing.rs
crates/biome_text_size/tests/indexing.rs
use biome_text_size::*; #[test] fn main() { let range = TextRange::default(); let _ = &""[range]; let _ = &String::new()[range]; }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_text_size/tests/auto_traits.rs
crates/biome_text_size/tests/auto_traits.rs
use { biome_text_size::*, static_assertions::*, std::{ fmt::Debug, hash::Hash, marker::{Send, Sync}, panic::{RefUnwindSafe, UnwindSafe}, }, }; // auto traits assert_impl_all!(TextSize: Send, Sync, Unpin, UnwindSafe, RefUnwindSafe); assert_impl_all!(TextRange: Send, Sync,...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_aria_metadata/build.rs
crates/biome_aria_metadata/build.rs
//! Generate ARAI metadata from `./aria-data.json` use biome_deserialize::Merge; use biome_string_case::Case; use proc_macro2::{Ident, Literal, Span, TokenStream}; use quote::{format_ident, quote}; use std::collections::{BTreeMap, BTreeSet}; use std::path::PathBuf; use std::{env, fs, io}; const WAI_ARIA: &str = "../....
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_aria_metadata/src/lib.rs
crates/biome_aria_metadata/src/lib.rs
use std::str::FromStr; include!(concat!(env!("OUT_DIR"), "/roles_and_attributes.rs")); pub const ISO_COUNTRIES: [&str; 233] = [ "AF", "AL", "DZ", "AS", "AD", "AO", "AI", "AQ", "AG", "AR", "AM", "AW", "AU", "AT", "AZ", "BS", "BH", "BD", "BB", "BY", "BE", "BZ", "BJ", "BM", "BT", "BO", "BA", "BW", "BR", "IO", "V...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_formatter_test/src/snapshot_builder.rs
crates/biome_formatter_test/src/snapshot_builder.rs
use biome_diagnostics::PrintDiagnostic; use biome_diagnostics::console::fmt::{Formatter, Termcolor}; use biome_diagnostics::console::markup; use biome_diagnostics::{DiagnosticExt, termcolor}; use biome_formatter::Printed; use biome_parser::AnyParse; use camino::Utf8Path; use std::fmt; use std::fmt::Write; #[derive(ser...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_formatter_test/src/test_prettier_snapshot.rs
crates/biome_formatter_test/src/test_prettier_snapshot.rs
use crate::TestFormatLanguage; use crate::check_reformat::CheckReformat; use crate::snapshot_builder::{SnapshotBuilder, SnapshotOutput}; use crate::utils::{PrettierDiff, get_prettier_diff, strip_prettier_placeholders}; use biome_formatter::{FormatLanguage, FormatOptions}; use biome_parser::AnyParse; use biome_rowan::{T...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_formatter_test/src/lib.rs
crates/biome_formatter_test/src/lib.rs
#![deny(clippy::use_self)] use biome_formatter::{CstFormatContext, FormatLanguage, FormatResult, Formatted, Printed}; use biome_parser::AnyParse; use biome_rowan::{SyntaxNode, TextRange}; use biome_service::file_handlers::DocumentFileSource; use biome_service::settings::{ServiceLanguage, Settings}; pub mod check_refo...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_formatter_test/src/diff_report.rs
crates/biome_formatter_test/src/diff_report.rs
use similar::{Algorithm, ChangeTag, utils::diff_lines}; use std::sync::Mutex; use std::{env, fmt::Write, fs::write, os::raw::c_int, str::FromStr, sync::Once}; use serde::Serialize; #[derive(Debug, PartialEq, Eq)] enum ReportType { Json, Markdown, } #[derive(Debug, Clone, Default, Serialize)] struct SingleFil...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_formatter_test/src/utils.rs
crates/biome_formatter_test/src/utils.rs
use crate::diff_report::DiffReport; use camino::Utf8Path; use similar::TextDiff; use std::fs::{read_to_string, remove_file}; struct StripPlaceholders { cursor: String, range_start_placeholder: String, range_end_placeholder: String, } /// Find and replace the cursor, range start and range end placeholders ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_formatter_test/src/check_reformat.rs
crates/biome_formatter_test/src/check_reformat.rs
use crate::TestFormatLanguage; use biome_diagnostics::console::fmt::{Formatter, Termcolor}; use biome_diagnostics::console::markup; use biome_diagnostics::termcolor; use biome_diagnostics::{DiagnosticExt, PrintDiagnostic}; use biome_rowan::SyntaxNode; /// Perform a second pass of formatting on a file, printing a diff ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_formatter_test/src/spec.rs
crates/biome_formatter_test/src/spec.rs
use crate::TestFormatLanguage; use crate::check_reformat::CheckReformat; use crate::snapshot_builder::{SnapshotBuilder, SnapshotOutput}; use crate::utils::strip_rome_placeholders; use biome_configuration::Configuration; use biome_console::EnvConsole; use biome_deserialize::json::deserialize_from_str; use biome_diagnost...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_aria/src/lib.rs
crates/biome_aria/src/lib.rs
#![deny(clippy::use_self)] pub mod roles; pub use roles::AriaRoles; pub trait Element { /// Name of the current element or `None` if it cannot be retrieved. fn name(&self) -> Option<impl AsRef<str>>; /// Attributes set on the current element. fn attributes(&self) -> impl Iterator<Item = impl Attribu...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_aria/src/roles.rs
crates/biome_aria/src/roles.rs
use biome_aria_metadata::AriaRole; use std::fmt::Debug; use crate::{Attribute, Element}; /// Convenient type to retrieve metadata regarding ARIA roles #[derive(Debug, Default)] pub struct AriaRoles; impl AriaRoles { pub fn get_implicit_role(&self, elt: &impl Element) -> Option<AriaRole> { // See https://...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_syntax/src/lib.rs
crates/biome_markdown_syntax/src/lib.rs
#![deny(clippy::use_self)] #[macro_use] mod generated; mod syntax_node; pub use self::generated::*; use biome_rowan::{RawSyntaxKind, SyntaxKind, TriviaPieceKind}; pub use syntax_node::*; impl From<u16> for MarkdownSyntaxKind { fn from(d: u16) -> Self { assert!(d <= (Self::__LAST as u16)); unsafe ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_syntax/src/syntax_node.rs
crates/biome_markdown_syntax/src/syntax_node.rs
//! This module defines the Concrete Syntax Tree used by Biome. //! //! The tree is entirely lossless, whitespace, comments, and errors are preserved. //! It also provides traversal methods including parent, children, and siblings of nodes. //! //! This is a simple wrapper around the `rowan` crate which does most of th...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_syntax/src/generated.rs
crates/biome_markdown_syntax/src/generated.rs
#[rustfmt::skip] pub(super) mod nodes; #[rustfmt::skip] pub mod macros; #[macro_use] pub mod kind; pub use kind::*; pub use nodes::*;
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_syntax/src/generated/nodes_mut.rs
crates/biome_markdown_syntax/src/generated/nodes_mut.rs
//! Generated file, do not edit by hand, see `xtask/codegen` use crate::{MarkdownSyntaxToken as SyntaxToken, generated::nodes::*}; use biome_rowan::AstNode; use std::iter::once; impl MdBullet { pub fn with_bullet_token(self, element: SyntaxToken) -> Self { Self::unwrap_cast( self.syntax ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_syntax/src/generated/kind.rs
crates/biome_markdown_syntax/src/generated/kind.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(bad_style, missing_docs, unreachable_pub)] #[doc = r" The kind of syntax node, e.g. `IDENT`, `FUNCTION_KW`, or `FOR_STMT`."] #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)] #[repr(u16)] pub enum MarkdownSyntaxKind { #[doc(hid...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_syntax/src/generated/macros.rs
crates/biome_markdown_syntax/src/generated/macros.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #[doc = r" Reconstruct an AstNode from a SyntaxNode"] #[doc = r""] #[doc = r" This macros performs a match over the [kind](biome_rowan::SyntaxNode::kind)"] #[doc = r" of the provided [biome_rowan::SyntaxNode] and constructs the appropriate"] #[doc = r" AstNo...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_markdown_syntax/src/generated/nodes.rs
crates/biome_markdown_syntax/src/generated/nodes.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(dead_code)] #![allow(unused)] use crate::{ MarkdownLanguage as Language, MarkdownSyntaxElement as SyntaxElement, MarkdownSyntaxElementChildren as SyntaxElementChildren, MarkdownSyntaxKind::{self as SyntaxKind, *}, MarkdownSyntaxList ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_syntax_codegen/src/ast.rs
crates/biome_syntax_codegen/src/ast.rs
//! Generate SyntaxKind definitions as well as typed AST definitions for nodes and tokens. //! This is derived from rust-analyzer/xtask/codegen use crate::generate_node_factory::generate_node_factory; use crate::generate_nodes_mut::generate_nodes_mut; use crate::generate_syntax_factory::generate_syntax_factory; use cr...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_syntax_codegen/src/lib.rs
crates/biome_syntax_codegen/src/lib.rs
//! Biome utility crate to generate a grammar that can be used with `biome_parser` //! The utility is based on internal fork of `ungrammar`, and it uses a **strict** naming convention //! to generate utility nodes such as union nodes, list nodes and more. //! //! Check the `examples/` folder to understand how to write ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_syntax_codegen/src/generate_nodes.rs
crates/biome_syntax_codegen/src/generate_nodes.rs
use crate::LanguageSrc; use crate::ast::{AstNodeSrc, AstSrc, Field, TokenKind}; use anyhow::Result; use biome_string_case::Case; use proc_macro2::{Literal, TokenStream}; use quote::{format_ident, quote}; use std::collections::HashMap; pub fn generate_nodes<K>(ast: &AstSrc, language_kind: &K) -> Result<String> where ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_syntax_codegen/src/language_src.rs
crates/biome_syntax_codegen/src/language_src.rs
use biome_string_case::Case; use proc_macro2::{Ident, TokenStream}; use quote::{format_ident, quote}; pub trait LanguageSrc { fn syntax_kind(&self) -> TokenStream { let ident = format_ident!( "{}{}", Case::Pascal.convert(self.language_prefix()), "SyntaxKind" ); ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_syntax_codegen/src/generate_node_factory.rs
crates/biome_syntax_codegen/src/generate_node_factory.rs
use crate::LanguageSrc; use crate::ast::{AstSrc, Field}; use anyhow::Result; use biome_string_case::Case; use proc_macro2::{Ident, Span}; use quote::{format_ident, quote}; pub fn generate_node_factory<K>( ast: &AstSrc, syntax_crate_name: &str, language_kind: &K, ) -> Result<String> where K: LanguageSrc...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_syntax_codegen/src/generate_syntax_factory.rs
crates/biome_syntax_codegen/src/generate_syntax_factory.rs
use crate::LanguageSrc; use crate::ast::AstSrc; use crate::generate_nodes::{get_field_predicate, group_fields_for_ordering, token_kind_to_code}; use anyhow::Result; use biome_string_case::Case; use proc_macro2::{Ident, Span, TokenStream}; use quote::{format_ident, quote}; pub fn generate_syntax_factory<K>( ast: &A...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_syntax_codegen/src/generate_syntax_kinds.rs
crates/biome_syntax_codegen/src/generate_syntax_kinds.rs
use crate::{LanguageSrc, Result}; use biome_string_case::Case; use proc_macro2::{Literal, Punct, Spacing}; use quote::{format_ident, quote}; pub fn generate_syntax_kinds<K>(language_kind: &K) -> Result<String> where K: LanguageSrc, { let syntax_kind = language_kind.syntax_kind(); let punctuation_values = l...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_syntax_codegen/src/generate_nodes_mut.rs
crates/biome_syntax_codegen/src/generate_nodes_mut.rs
use crate::LanguageSrc; use crate::ast::{AstSrc, Field}; use anyhow::Result; use quote::{format_ident, quote}; pub fn generate_nodes_mut<K>(ast: &AstSrc, kind_source: &K) -> Result<String> where K: LanguageSrc, { let node_boilerplate_impls: Vec<_> = ast .nodes .iter() .map(|node| { ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_syntax_codegen/src/generate_macros.rs
crates/biome_syntax_codegen/src/generate_macros.rs
use crate::LanguageSrc; use crate::ast::AstSrc; use anyhow::Result; use biome_string_case::Case; use quote::{format_ident, quote}; pub fn generate_macros<K>(ast: &AstSrc, language_kind: &K) -> Result<String> where K: LanguageSrc, { let syntax_kind = language_kind.syntax_kind(); let syntax_node = language_k...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_syntax_codegen/examples/minigrammar.rs
crates/biome_syntax_codegen/examples/minigrammar.rs
use biome_syntax_codegen::{GrammarOptions, LanguageSrc, generate_grammar}; use std::env::current_dir; struct Source; impl LanguageSrc for Source { fn punct(&self) -> &[(&str, &str)] { &[ ("?", "QUESTION"), ("*", "ASTERISK"), (":", "COLON"), ("(", "L_BRACKET"...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_css_factory/src/lib.rs
crates/biome_css_factory/src/lib.rs
#![deny(clippy::use_self)] pub use crate::generated::CssSyntaxFactory; use biome_css_syntax::CssLanguage; use biome_rowan::TreeBuilder; mod generated; // Re-exported for tests #[doc(hidden)] pub use biome_css_syntax as syntax; pub type CssSyntaxTreeBuilder = TreeBuilder<'static, CssLanguage, CssSyntaxFactory>; pub...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_css_factory/src/generated.rs
crates/biome_css_factory/src/generated.rs
#[rustfmt::skip] pub(super) mod syntax_factory; #[rustfmt::skip] pub mod node_factory; pub use syntax_factory::CssSyntaxFactory;
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_css_factory/src/generated/syntax_factory.rs
crates/biome_css_factory/src/generated/syntax_factory.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(unused_mut)] use biome_css_syntax::{CssSyntaxKind, CssSyntaxKind::*, T, *}; use biome_rowan::{ AstNode, ParsedChildren, RawNodeSlots, RawSyntaxNode, SyntaxFactory, SyntaxKind, }; #[derive(Debug)] pub struct CssSyntaxFactory; impl SyntaxFactory f...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_css_factory/src/generated/node_factory.rs
crates/biome_css_factory/src/generated/node_factory.rs
//! Generated file, do not edit by hand, see `xtask/codegen` #![allow(clippy::redundant_closure)] use biome_css_syntax::{ CssSyntaxElement as SyntaxElement, CssSyntaxNode as SyntaxNode, CssSyntaxToken as SyntaxToken, *, }; use biome_rowan::AstNode; pub fn css_at_rule(at_token: SyntaxToken, rule: AnyCssAtRule) ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
true
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_ruledoc_utils/src/lib.rs
crates/biome_ruledoc_utils/src/lib.rs
mod codeblock; use std::collections::HashMap; use std::hash::BuildHasher; use std::sync::Arc; use biome_fs::{BiomePath, MemoryFileSystem}; use biome_js_analyze::JsAnalyzerServices; use biome_js_parser::JsFileSource; use biome_json_parser::{JsonParserOptions, parse_json}; use biome_module_graph::ModuleGraph; use biome...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_ruledoc_utils/src/codeblock.rs
crates/biome_ruledoc_utils/src/codeblock.rs
use std::str::FromStr; use anyhow::{Result, bail}; use biome_analyze::AnalyzerOptions; use biome_configuration::Configuration; use biome_fs::BiomePath; use biome_service::{ settings::{ServiceLanguage, Settings}, workspace::DocumentFileSource, }; /// Represents a single code block used for evaluating doc tests...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/lib.rs
crates/biome_json_analyze/src/lib.rs
#![deny(clippy::use_self)] mod assist; mod lint; mod registry; mod services; mod suppression_action; pub mod utils; pub use crate::registry::visit_registry; use crate::services::config_source::ConfigSource; use crate::suppression_action::JsonSuppressionAction; pub use biome_analyze::ExtendedConfigurationProvider; us...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/assist.rs
crates/biome_json_analyze/src/assist.rs
//! Generated file, do not edit by hand, see `xtask/codegen` //! Generated file, do not edit by hand, see `xtask/codegen` pub mod source; ::biome_analyze::declare_category! { pub Assist { kind : Action , groups : [self :: source :: Source ,] } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/suppression_action.rs
crates/biome_json_analyze/src/suppression_action.rs
use biome_analyze::{ApplySuppression, SuppressionAction}; use biome_json_syntax::JsonLanguage; use biome_rowan::{BatchMutation, SyntaxToken}; pub(crate) struct JsonSuppressionAction; impl SuppressionAction for JsonSuppressionAction { type Language = JsonLanguage; fn find_token_for_inline_suppression( ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/lint.rs
crates/biome_json_analyze/src/lint.rs
//! Generated file, do not edit by hand, see `xtask/codegen` //! Generated file, do not edit by hand, see `xtask/codegen` pub mod nursery; pub mod suspicious; ::biome_analyze::declare_category! { pub Lint { kind : Lint , groups : [self :: nursery :: Nursery , self :: suspicious :: Suspicious ,] } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/assists.rs
crates/biome_json_analyze/src/assists.rs
//! Generated file, do not edit by hand, see `xtask/codegen` //! Generated file, do not edit by hand, see `xtask/codegen` pub mod source; ::biome_analyze::declare_category! { pub Assists { kind : Action , groups : [self :: source :: Source ,] } }
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/utils.rs
crates/biome_json_analyze/src/utils.rs
use biome_json_syntax::JsonMember; use biome_rowan::AstNode; use camino::Utf8Path; /// Finds the first ancestor [JsonMember], and returns [true] if it's name matches the given input pub(crate) fn matches_parent_object(node: &JsonMember, name: &str) -> bool { node.syntax() .ancestors() .skip(1) ...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/registry.rs
crates/biome_json_analyze/src/registry.rs
//! Generated file, do not edit by hand, see `xtask/codegen` //! Generated file, do not edit by hand, see `xtask/codegen` use biome_analyze::RegistryVisitor; use biome_json_syntax::JsonLanguage; pub fn visit_registry<V: RegistryVisitor<JsonLanguage>>(registry: &mut V) { registry.record_category::<crate::assist::A...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/services/config_source.rs
crates/biome_json_analyze/src/services/config_source.rs
use biome_analyze::{ AddVisitor, ExtendedConfigurationProvider, FromServices, Phase, Phases, QueryKey, Queryable, RuleKey, RuleMetadata, ServiceBag, ServicesDiagnostic, SyntaxVisitor, }; use biome_json_syntax::{JsonLanguage, JsonRoot, JsonSyntaxNode}; use biome_rowan::AstNode; use std::sync::Arc; #[derive(Debu...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/services/mod.rs
crates/biome_json_analyze/src/services/mod.rs
pub(crate) mod config_source;
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/lint/nursery.rs
crates/biome_json_analyze/src/lint/nursery.rs
//! Generated file, do not edit by hand, see `xtask/codegen` //! Generated file, do not edit by hand, see `xtask/codegen` use biome_analyze::declare_lint_group; pub mod no_duplicate_dependencies; pub mod use_required_scripts; declare_lint_group! { pub Nursery { name : "nursery" , rules : [self :: no_duplicate_depende...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/lint/suspicious.rs
crates/biome_json_analyze/src/lint/suspicious.rs
//! Generated file, do not edit by hand, see `xtask/codegen` //! Generated file, do not edit by hand, see `xtask/codegen` use biome_analyze::declare_lint_group; pub mod no_biome_first_exception; pub mod no_duplicate_object_keys; pub mod no_quickfix_biome; pub mod use_biome_ignore_folder; declare_lint_group! { pub Sus...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/lint/suspicious/no_quickfix_biome.rs
crates/biome_json_analyze/src/lint/suspicious/no_quickfix_biome.rs
use crate::JsonRuleAction; use biome_analyze::{Ast, FixKind, Rule, RuleDiagnostic, context::RuleContext, declare_lint_rule}; use biome_console::markup; use biome_json_factory::make::{ json_boolean_value, json_member, json_member_list, json_member_name, json_string_literal, json_string_value, token, }; use biome...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/lint/suspicious/no_biome_first_exception.rs
crates/biome_json_analyze/src/lint/suspicious/no_biome_first_exception.rs
use crate::{ConfigSource, JsonRuleAction}; use biome_analyze::{FixKind, Rule, RuleDiagnostic, context::RuleContext, declare_lint_rule}; use biome_console::markup; use biome_diagnostics::Severity; use biome_json_factory::make::{ json_array_element_list, json_string_literal, json_string_value, token, }; use biome_jso...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/lint/suspicious/no_duplicate_object_keys.rs
crates/biome_json_analyze/src/lint/suspicious/no_duplicate_object_keys.rs
use biome_analyze::{Ast, Rule, RuleDiagnostic, context::RuleContext, declare_lint_rule}; use biome_console::markup; use biome_diagnostics::Severity; use biome_json_syntax::{JsonMemberName, JsonObjectValue, TextRange}; use biome_rowan::{AstNode, AstSeparatedList}; use biome_rule_options::no_duplicate_object_keys::NoDupl...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/lint/suspicious/use_biome_ignore_folder.rs
crates/biome_json_analyze/src/lint/suspicious/use_biome_ignore_folder.rs
use crate::JsonRuleAction; use crate::utils::matches_parent_object; use biome_analyze::{Ast, FixKind, Rule, RuleDiagnostic, context::RuleContext, declare_lint_rule}; use biome_console::markup; use biome_diagnostics::Severity; use biome_json_factory::make::{json_string_literal, json_string_value}; use biome_json_syntax:...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false
biomejs/biome
https://github.com/biomejs/biome/blob/499594b74475be0ae81ce50858e76c9c97b8c48f/crates/biome_json_analyze/src/lint/nursery/no_duplicate_dependencies.rs
crates/biome_json_analyze/src/lint/nursery/no_duplicate_dependencies.rs
use biome_analyze::{ Ast, Rule, RuleDiagnostic, RuleSource, context::RuleContext, declare_lint_rule, }; use biome_console::markup; use biome_json_syntax::{JsonRoot, JsonSyntaxKind, JsonSyntaxToken}; use biome_rowan::{AstNode, AstSeparatedList}; use biome_rule_options::no_duplicate_dependencies::NoDuplicateDependenc...
rust
Apache-2.0
499594b74475be0ae81ce50858e76c9c97b8c48f
2026-01-04T15:39:05.365085Z
false