diff --git a/lint_rules/adjacent_overload_signatures.md b/lint_rules/adjacent_overload_signatures.md index 8435f53a..7f4e4f34 100644 --- a/lint_rules/adjacent_overload_signatures.md +++ b/lint_rules/adjacent_overload_signatures.md @@ -3,7 +3,7 @@ Requires overload signatures to be adjacent to each other. Overloaded signatures which are not next to each other can lead to code which is hard to read and maintain. -### Invalid: +**Invalid:** (`bar` is declared in-between `foo` overloads) @@ -41,7 +41,7 @@ export function bar(): void {} export function foo(sn: string | number): void {} ``` -### Valid: +**Valid:** (`bar` is declared after `foo`) diff --git a/lint_rules/ban_ts_comment.md b/lint_rules/ban_ts_comment.md index fbf59cc2..ce9401cc 100644 --- a/lint_rules/ban_ts_comment.md +++ b/lint_rules/ban_ts_comment.md @@ -4,7 +4,7 @@ Typescript directives reduce the effectiveness of the compiler, something which should only be done in exceptional circumstances. The reason why should be documented in a comment alongside the directive. -### Invalid: +**Invalid:** ```typescript // @ts-expect-error @@ -21,7 +21,7 @@ let a: number = "I am a string"; let a: number = "I am a string"; ``` -### Valid: +**Valid:** ```typescript // @ts-expect-error: Temporary workaround (see ticket #422) diff --git a/lint_rules/ban_types.md b/lint_rules/ban_types.md index e7dca492..12826cad 100644 --- a/lint_rules/ban_types.md +++ b/lint_rules/ban_types.md @@ -17,7 +17,7 @@ safety with the function. Finally, `Object` and `{}` means "any non-nullish value" rather than "any object type". `object` is a good choice for a meaning of "any object type". -### Invalid: +**Invalid:** ```typescript let a: Boolean; @@ -29,7 +29,7 @@ let f: Object; let g: {}; ``` -### Valid: +**Valid:** ```typescript let a: boolean; diff --git a/lint_rules/ban_unknown_rule_code.md b/lint_rules/ban_unknown_rule_code.md index 6d33ad43..05f6862d 100644 --- a/lint_rules/ban_unknown_rule_code.md +++ b/lint_rules/ban_unknown_rule_code.md @@ -12,7 +12,7 @@ const foo: any = 42; This rule checks for the validity of the specified rule names (i.e. whether `deno_lint` provides the rule or not). -### Invalid: +**Invalid:** ```typescript // typo @@ -24,7 +24,7 @@ console.assert(x == 42); const b = "b"; ``` -### Valid: +**Valid:** ```typescript // deno-lint-ignore eq-eq-eq diff --git a/lint_rules/ban_untagged_ignore.md b/lint_rules/ban_untagged_ignore.md index 48af34a5..05bb1203 100644 --- a/lint_rules/ban_untagged_ignore.md +++ b/lint_rules/ban_untagged_ignore.md @@ -3,14 +3,14 @@ Requires `deno-lint-ignore` to be annotated with one or more rule names. Ignoring all rules can mask unexpected or future problems. Therefore you need to explicitly specify which rule(s) are to be ignored. -### Invalid: +**Invalid:** ```typescript // deno-lint-ignore export function duplicateArgumentsFn(a, b, a) {} ``` -### Valid: +**Valid:** ```typescript // deno-lint-ignore no-dupe-args diff --git a/lint_rules/ban_untagged_todo.md b/lint_rules/ban_untagged_todo.md index a48b6c1c..f7d0a288 100644 --- a/lint_rules/ban_untagged_todo.md +++ b/lint_rules/ban_untagged_todo.md @@ -4,7 +4,7 @@ reference (`#issue`). TODOs without reference to a user or an issue become stale with no easy way to get more information. -### Invalid: +**Invalid:** ```typescript // TODO Improve calc engine @@ -21,7 +21,7 @@ export function calcValue(): number {} export function calcValue(): number {} ``` -### Valid: +**Valid:** ```typescript // TODO(djones) Improve calc engine diff --git a/lint_rules/ban_unused_ignore.md b/lint_rules/ban_unused_ignore.md index 5978ee28..dfa8dd04 100644 --- a/lint_rules/ban_unused_ignore.md +++ b/lint_rules/ban_unused_ignore.md @@ -9,7 +9,7 @@ likely to confuse future code readers, and to make matters worse, might hide future lint errors unintentionally. To prevent such situations, this rule detects unused, superfluous ignore directives. -### Invalid: +**Invalid:** ```typescript // Actually this line is valid since `export` means "used", @@ -18,7 +18,7 @@ detects unused, superfluous ignore directives. export const foo = 42; ``` -### Valid: +**Valid:** ```typescript export const foo = 42; diff --git a/lint_rules/button_has_type.md b/lint_rules/button_has_type.md index 5607e13f..2c097565 100644 --- a/lint_rules/button_has_type.md +++ b/lint_rules/button_has_type.md @@ -1,7 +1,7 @@ Checks that a `