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
18 changes: 17 additions & 1 deletion crates/oxc_linter/src/config/oxlintrc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,23 @@ use crate::{options::LintPlugins, utils::read_to_string};
pub struct Oxlintrc {
pub plugins: LintPlugins,
pub categories: OxlintCategories,
/// See [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html).
/// Example
///
/// `.oxlintrc.json`
///
/// ```json
/// {
/// "$schema": "./node_modules/oxlint/configuration_schema.json",
/// "rules": {
/// "eqeqeq": "warn",
/// "import/no-cycle": "error",
/// "prefer-const": ["error", { "ignoreReadBeforeAssign": true }]
/// }
/// }
/// ```
///
/// See [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html) for the list of
/// rules.
pub rules: OxlintRules,
pub settings: OxlintSettings,
/// Environments enable and disable collections of global variables.
Expand Down
2 changes: 1 addition & 1 deletion crates/oxc_linter/src/snapshots/schema_json.snap
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ expression: json
]
},
"rules": {
"description": "See [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html).",
"description": "Example\n\n`.oxlintrc.json`\n\n```json { \"$schema\": \"./node_modules/oxlint/configuration_schema.json\", \"rules\": { \"eqeqeq\": \"warn\", \"import/no-cycle\": \"error\", \"prefer-const\": [\"error\", { \"ignoreReadBeforeAssign\": true }] } } ```\n\nSee [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html) for the list of rules.",
"default": {},
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion npm/oxlint/configuration_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
]
},
"rules": {
"description": "See [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html).",
"description": "Example\n\n`.oxlintrc.json`\n\n```json { \"$schema\": \"./node_modules/oxlint/configuration_schema.json\", \"rules\": { \"eqeqeq\": \"warn\", \"import/no-cycle\": \"error\", \"prefer-const\": [\"error\", { \"ignoreReadBeforeAssign\": true }] } } ```\n\nSee [Oxlint Rules](https://oxc.rs/docs/guide/usage/linter/rules.html) for the list of rules.",
"default": {},
"allOf": [
{
Expand Down