From 097d201dbaa88b0d07ae532547674af7eeaf52fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 11 Dec 2024 01:46:14 +0100 Subject: [PATCH] process and actually display something useful --- lint_rules/adjacent_overload_signatures.md | 4 ++-- lint_rules/ban_ts_comment.md | 4 ++-- lint_rules/ban_types.md | 4 ++-- lint_rules/ban_unknown_rule_code.md | 4 ++-- lint_rules/ban_untagged_ignore.md | 4 ++-- lint_rules/ban_untagged_todo.md | 4 ++-- lint_rules/ban_unused_ignore.md | 4 ++-- lint_rules/button_has_type.md | 4 ++-- lint_rules/camelcase.md | 4 ++-- lint_rules/constructor_super.md | 4 ++-- lint_rules/default_param_last.md | 4 ++-- lint_rules/eqeqeq.md | 4 ++-- lint_rules/explicit_function_return_type.md | 4 ++-- lint_rules/explicit_module_boundary_types.md | 4 ++-- lint_rules/for_direction.md | 4 ++-- lint_rules/fresh_handler_export.md | 4 ++-- lint_rules/fresh_server_event_handlers.md | 4 ++-- lint_rules/getter_return.md | 4 ++-- lint_rules/guard_for_in.md | 4 ++-- lint_rules/jsx_boolean_value.md | 4 ++-- lint_rules/jsx_curly_braces.md | 4 ++-- lint_rules/jsx_key.md | 4 ++-- lint_rules/jsx_no_children_prop.md | 4 ++-- lint_rules/jsx_no_danger_with_children.md | 4 ++-- lint_rules/jsx_no_duplicate_props.md | 4 ++-- lint_rules/jsx_no_useless_fragment.md | 4 ++-- lint_rules/jsx_props_no_spread_multi.md | 4 ++-- lint_rules/jsx_void_dom_elements_no_children.md | 4 ++-- lint_rules/no_array_constructor.md | 4 ++-- lint_rules/no_async_promise_executor.md | 4 ++-- lint_rules/no_await_in_loop.md | 4 ++-- lint_rules/no_await_in_sync_fn.md | 4 ++-- lint_rules/no_boolean_literal_for_arguments.md | 4 ++-- lint_rules/no_case_declarations.md | 4 ++-- lint_rules/no_class_assign.md | 4 ++-- lint_rules/no_compare_neg_zero.md | 4 ++-- lint_rules/no_cond_assign.md | 4 ++-- lint_rules/no_console.md | 4 ++-- lint_rules/no_const_assign.md | 4 ++-- lint_rules/no_constant_condition.md | 4 ++-- lint_rules/no_control_regex.md | 4 ++-- lint_rules/no_danger.md | 4 ++-- lint_rules/no_debugger.md | 4 ++-- lint_rules/no_delete_var.md | 4 ++-- lint_rules/no_dupe_args.md | 4 ++-- lint_rules/no_dupe_class_members.md | 4 ++-- lint_rules/no_dupe_else_if.md | 4 ++-- lint_rules/no_dupe_keys.md | 4 ++-- lint_rules/no_duplicate_case.md | 4 ++-- lint_rules/no_empty.md | 4 ++-- lint_rules/no_empty_character_class.md | 4 ++-- lint_rules/no_empty_enum.md | 4 ++-- lint_rules/no_empty_interface.md | 4 ++-- lint_rules/no_empty_pattern.md | 4 ++-- lint_rules/no_eval.md | 4 ++-- lint_rules/no_ex_assign.md | 4 ++-- lint_rules/no_explicit_any.md | 4 ++-- lint_rules/no_external_imports.md | 4 ++-- lint_rules/no_extra_boolean_cast.md | 4 ++-- lint_rules/no_extra_non_null_assertion.md | 4 ++-- lint_rules/no_fallthrough.md | 4 ++-- lint_rules/no_func_assign.md | 4 ++-- lint_rules/no_global_assign.md | 2 +- lint_rules/no_implicit_declare_namespace_export.md | 4 ++-- lint_rules/no_import_assertions.md | 4 ++-- lint_rules/no_import_assign.md | 4 ++-- lint_rules/no_inferrable_types.md | 4 ++-- lint_rules/no_inner_declarations.md | 4 ++-- lint_rules/no_invalid_regexp.md | 4 ++-- lint_rules/no_invalid_triple_slash_reference.md | 12 ++++++------ lint_rules/no_misused_new.md | 4 ++-- lint_rules/no_namespace.md | 4 ++-- lint_rules/no_new_symbol.md | 4 ++-- lint_rules/no_node_globals.md | 4 ++-- lint_rules/no_non_null_asserted_optional_chain.md | 4 ++-- lint_rules/no_non_null_assertion.md | 4 ++-- lint_rules/no_obj_calls.md | 4 ++-- lint_rules/no_octal.md | 4 ++-- lint_rules/no_process_global.md | 4 ++-- lint_rules/no_prototype_builtins.md | 4 ++-- lint_rules/no_redeclare.md | 4 ++-- lint_rules/no_regex_spaces.md | 4 ++-- lint_rules/no_self_assign.md | 4 ++-- lint_rules/no_self_compare.md | 4 ++-- lint_rules/no_setter_return.md | 4 ++-- lint_rules/no_shadow_restricted_names.md | 4 ++-- lint_rules/no_sparse_arrays.md | 4 ++-- lint_rules/no_sync_fn_in_async_fn.md | 4 ++-- lint_rules/no_this_alias.md | 4 ++-- lint_rules/no_this_before_super.md | 4 ++-- lint_rules/no_throw_literal.md | 4 ++-- lint_rules/no_top_level_await.md | 4 ++-- lint_rules/no_undef.md | 2 +- lint_rules/no_unreachable.md | 4 ++-- lint_rules/no_unsafe_finally.md | 4 ++-- lint_rules/no_unsafe_negation.md | 4 ++-- lint_rules/no_unused_labels.md | 4 ++-- lint_rules/no_unused_vars.md | 4 ++-- lint_rules/no_useless_rename.md | 4 ++-- lint_rules/no_var.md | 4 ++-- lint_rules/no_window_global.md | 4 ++-- lint_rules/no_window_prefix.md | 4 ++-- lint_rules/no_with.md | 2 +- lint_rules/prefer_as_const.md | 4 ++-- lint_rules/prefer_ascii.md | 4 ++-- lint_rules/prefer_const.md | 4 ++-- lint_rules/prefer_namespace_keyword.md | 4 ++-- lint_rules/prefer_primordials.md | 4 ++-- lint_rules/require_await.md | 4 ++-- lint_rules/require_yield.md | 4 ++-- lint_rules/single_var_declarator.md | 4 ++-- lint_rules/triple_slash_reference.md | 4 ++-- lint_rules/use_isnan.md | 4 ++-- lint_rules/valid_typeof.md | 4 ++-- lint_rules/verbatim_module_syntax.md | 4 ++-- runtime/reference/cli/lint.md | 13 +++++-------- 116 files changed, 236 insertions(+), 239 deletions(-) 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 `