Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ Members are listed in alphabetical order. Members are free to use the full name,
- [Dani Guardiola @DaniGuardiola](https://github.com/DaniGuardiola)
- [Justinas Delinda @minht11](https://github.com/minht11)
- [Madeline Gurriarán @SuperchupuDev](https://github.com/SuperchupuDev)
- [Maikel @Netail](https://github.com/netail)
- [Marat Dulin @mdevils](https://github.com/mdevils)
- [Vladimir Ivanov_@vlad](https://github.com/vladimir-ivanov)
- [Vo Hoang Long @vohoanglong0107](https://github.com/vohoanglong0107)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,3 @@ expression: allowComments.graphql
# Allowed comment

```

# Diagnostics
```
allowComments.graphql:2:1 lint/nursery/noEmptySource ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

i An empty source is not allowed.

1 │ # Allowed comment
> 2 │

i Empty sources can clutter the codebase and increase cognitive load; deleting empty sources can help reduce it.


```
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "../../../../../../packages/@biomejs/biome/configuration_schema.json",
"$schema": "../../../../../../../packages/@biomejs/biome/configuration_schema.json",
"linter": {
"rules": {
"nursery": {
Expand Down
10 changes: 8 additions & 2 deletions crates/biome_service/src/file_handlers/graphql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use super::{
SearchCapabilities, is_diagnostic_error,
};
use crate::WorkspaceError;
use crate::configuration::to_analyzer_rules;
use crate::file_handlers::DebugCapabilities;
use crate::file_handlers::{
AnalyzerCapabilities, Capabilities, FormatterCapabilities, ParserCapabilities,
Expand All @@ -16,7 +17,9 @@ use crate::utils::growth_guard::GrowthGuard;
use crate::workspace::{
CodeAction, FixAction, FixFileMode, FixFileResult, GetSyntaxTreeResult, PullActionsResult,
};
use biome_analyze::{AnalysisFilter, AnalyzerOptions, ControlFlow, Never, RuleError};
use biome_analyze::{
AnalysisFilter, AnalyzerConfiguration, AnalyzerOptions, ControlFlow, Never, RuleError,
};
use biome_configuration::graphql::{
GraphqlAssistConfiguration, GraphqlAssistEnabled, GraphqlFormatterConfiguration,
GraphqlFormatterEnabled, GraphqlLinterConfiguration, GraphqlLinterEnabled,
Expand Down Expand Up @@ -167,15 +170,18 @@ impl ServiceLanguage for GraphqlLanguage {
}

fn resolve_analyzer_options(
_global: &Settings,
global: &Settings,
_language: &Self::LinterSettings,
_environment: Option<&Self::EnvironmentSettings>,
path: &BiomePath,
_file_source: &DocumentFileSource,
suppression_reason: Option<&str>,
) -> AnalyzerOptions {
let configuration =
AnalyzerConfiguration::default().with_rules(to_analyzer_rules(global, path.as_path()));
AnalyzerOptions::default()
.with_file_path(path.as_path())
.with_configuration(configuration)
.with_suppression_reason(suppression_reason)
}

Expand Down