From 538b24a7198c5f68f6bbb192c8e033eca735a531 Mon Sep 17 00:00:00 2001 From: Tapan Prakash Date: Sat, 18 Jan 2025 14:32:32 +0530 Subject: [PATCH] feat(linter): Format the configuration documentation correctly (#8583) The categories section in the documentation is not formatted correctly. This fix aims to correct the formatting. Before before After after --- crates/oxc_linter/src/config/categories.rs | 2 +- crates/oxc_linter/src/snapshots/schema_json.snap | 2 +- npm/oxlint/configuration_schema.json | 2 +- tasks/website/src/linter/snapshots/schema_markdown.snap | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/oxc_linter/src/config/categories.rs b/crates/oxc_linter/src/config/categories.rs index 6eb3ee16d..111a188f4 100644 --- a/crates/oxc_linter/src/config/categories.rs +++ b/crates/oxc_linter/src/config/categories.rs @@ -61,7 +61,7 @@ Configure an entire category of rules all at once. Rules enabled or disabled this way will be overwritten by individual rules in the `rules` field. -# Example +Example ```json { "$schema": "./node_modules/oxlint/configuration_schema.json", diff --git a/crates/oxc_linter/src/snapshots/schema_json.snap b/crates/oxc_linter/src/snapshots/schema_json.snap index 6c939e9ee..f07dfdffd 100644 --- a/crates/oxc_linter/src/snapshots/schema_json.snap +++ b/crates/oxc_linter/src/snapshots/schema_json.snap @@ -305,7 +305,7 @@ snapshot_kind: text }, "OxlintCategories": { "title": "Rule Categories", - "description": "Configure an entire category of rules all at once.\n\nRules enabled or disabled this way will be overwritten by individual rules in the `rules` field.\n\n# Example\n```json\n{\n \"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n \"categories\": {\n \"correctness\": \"warn\"\n },\n \"rules\": {\n \"eslint/no-unused-vars\": \"error\"\n }\n}\n```", + "description": "Configure an entire category of rules all at once.\n\nRules enabled or disabled this way will be overwritten by individual rules in the `rules` field.\n\nExample\n```json\n{\n \"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n \"categories\": {\n \"correctness\": \"warn\"\n },\n \"rules\": {\n \"eslint/no-unused-vars\": \"error\"\n }\n}\n```", "examples": [ { "correctness": "warn" diff --git a/npm/oxlint/configuration_schema.json b/npm/oxlint/configuration_schema.json index 8209ad165..641d05f79 100644 --- a/npm/oxlint/configuration_schema.json +++ b/npm/oxlint/configuration_schema.json @@ -300,7 +300,7 @@ }, "OxlintCategories": { "title": "Rule Categories", - "description": "Configure an entire category of rules all at once.\n\nRules enabled or disabled this way will be overwritten by individual rules in the `rules` field.\n\n# Example\n```json\n{\n \"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n \"categories\": {\n \"correctness\": \"warn\"\n },\n \"rules\": {\n \"eslint/no-unused-vars\": \"error\"\n }\n}\n```", + "description": "Configure an entire category of rules all at once.\n\nRules enabled or disabled this way will be overwritten by individual rules in the `rules` field.\n\nExample\n```json\n{\n \"$schema\": \"./node_modules/oxlint/configuration_schema.json\",\n \"categories\": {\n \"correctness\": \"warn\"\n },\n \"rules\": {\n \"eslint/no-unused-vars\": \"error\"\n }\n}\n```", "examples": [ { "correctness": "warn" diff --git a/tasks/website/src/linter/snapshots/schema_markdown.snap b/tasks/website/src/linter/snapshots/schema_markdown.snap index 828043138..59f51fd90 100644 --- a/tasks/website/src/linter/snapshots/schema_markdown.snap +++ b/tasks/website/src/linter/snapshots/schema_markdown.snap @@ -62,7 +62,7 @@ Configure an entire category of rules all at once. Rules enabled or disabled this way will be overwritten by individual rules in the `rules` field. -# Example +Example ```json { "$schema": "./node_modules/oxlint/configuration_schema.json",