Skip to content

Commit

Permalink
feat(linter): implement typescript/no-magic-numbers (#4745)
Browse files Browse the repository at this point in the history
Linter rule: https://eslint.org/docs/latest/rules/no-magic-numbers
and: https://typescript-eslint.io/rules/no-magic-numbers/

---------

Co-authored-by: Don Isaac <donald.isaac@gmail.com>
  • Loading branch information
Sysix and DonIsaac authored Sep 6, 2024
1 parent af69393 commit be3a432
Show file tree
Hide file tree
Showing 3 changed files with 1,769 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/oxc_linter/src/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ mod typescript {
pub mod no_extra_non_null_assertion;
pub mod no_extraneous_class;
pub mod no_import_type_side_effects;
pub mod no_magic_numbers;
pub mod no_misused_new;
pub mod no_namespace;
pub mod no_non_null_asserted_nullish_coalescing;
Expand Down Expand Up @@ -502,7 +503,6 @@ oxc_macros::declare_all_lint_rules! {
eslint::no_caller,
eslint::no_case_declarations,
eslint::no_class_assign,
eslint::no_multi_str,
eslint::no_label_var,
eslint::require_await,
eslint::no_compare_neg_zero,
Expand Down Expand Up @@ -537,6 +537,7 @@ oxc_macros::declare_all_lint_rules! {
eslint::no_irregular_whitespace,
eslint::no_iterator,
eslint::no_loss_of_precision,
eslint::no_multi_str,
eslint::no_new,
eslint::no_new_func,
eslint::no_new_wrappers,
Expand Down Expand Up @@ -597,6 +598,7 @@ oxc_macros::declare_all_lint_rules! {
typescript::no_explicit_any,
typescript::no_extra_non_null_assertion,
typescript::no_import_type_side_effects,
typescript::no_magic_numbers,
typescript::no_misused_new,
typescript::no_namespace,
typescript::no_non_null_asserted_optional_chain,
Expand Down
Loading

0 comments on commit be3a432

Please sign in to comment.