From b8a648d8c046d9331b45d9b0416e3c3c0b389f00 Mon Sep 17 00:00:00 2001 From: Tapan Prakash Date: Sat, 18 Jan 2025 13:26:52 +0530 Subject: [PATCH 1/3] feat(linter): Format the configuration documentation correctly The categories section in the documentation is not formatted correctly. This fix aims to correct the formatting. --- crates/oxc_linter/src/config/categories.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_linter/src/config/categories.rs b/crates/oxc_linter/src/config/categories.rs index 6eb3ee16d5e60..111a188f4c0b2 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", From f12e9fa7fc3a86f4d97f71f4eb98fd75748c4d90 Mon Sep 17 00:00:00 2001 From: Tapan Prakash Date: Sat, 18 Jan 2025 13:40:01 +0530 Subject: [PATCH 2/3] Fix test cases failure --- crates/oxc_linter/src/snapshots/schema_json.snap | 2 +- npm/oxlint/configuration_schema.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/oxc_linter/src/snapshots/schema_json.snap b/crates/oxc_linter/src/snapshots/schema_json.snap index 6c939e9ee3a06..f07dfdffdbc1d 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 8209ad1655b80..641d05f79b336 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" From cebe39878470fa2b934c6628eaabb14eeac38189 Mon Sep 17 00:00:00 2001 From: Tapan Prakash Date: Sat, 18 Jan 2025 14:19:47 +0530 Subject: [PATCH 3/3] Fix website snapshot --- tasks/website/src/linter/snapshots/schema_markdown.snap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/website/src/linter/snapshots/schema_markdown.snap b/tasks/website/src/linter/snapshots/schema_markdown.snap index 8280431385817..59f51fd9099d0 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",