Skip to content

Commit a2c97f3

Browse files
baevmcamc314
andauthored
feat(linter/unicorn): implement explicit-timer-delay rule (#23612)
this PR implements `unicorn/explicit-timer-delay`, issue #684 Co-authored-by: Cameron <cameron.clark@hey.com>
1 parent 122d112 commit a2c97f3

7 files changed

Lines changed: 676 additions & 1 deletion

File tree

apps/oxlint/src-js/package/config.generated.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ export type PathOption = "always" | "never";
347347
export type TypesOption = "always" | "never" | "prefer-import";
348348
export type BomOptionType = "always" | "never";
349349
export type NonZero = "greater-than" | "not-equal";
350+
export type ExplicitTimerDelayMode = "always" | "never";
350351
export type ModuleStylesOverride =
351352
| (
352353
| false
@@ -1514,6 +1515,7 @@ export interface DummyRuleMap {
15141515
"unicorn/error-message"?: RuleNoConfig;
15151516
"unicorn/escape-case"?: RuleNoConfig;
15161517
"unicorn/explicit-length-check"?: RuleNoConfig | [AllowWarnDeny, ExplicitLengthCheck];
1518+
"unicorn/explicit-timer-delay"?: RuleNoConfig | [AllowWarnDeny, ExplicitTimerDelayMode];
15171519
"unicorn/filename-case"?: DummyRule;
15181520
"unicorn/import-style"?: RuleNoConfig | [AllowWarnDeny, ImportStyleConfig];
15191521
"unicorn/max-nested-calls"?: RuleNoConfig | [AllowWarnDeny, MaxNestedCalls];

crates/oxc_linter/src/generated/rule_runner_impls.rs

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/oxc_linter/src/generated/rules_enum.rs

Lines changed: 29 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/oxc_linter/src/rules.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ pub(crate) mod unicorn {
496496
pub mod error_message;
497497
pub mod escape_case;
498498
pub mod explicit_length_check;
499+
pub mod explicit_timer_delay;
499500
pub mod filename_case;
500501
pub mod import_style;
501502
pub mod max_nested_calls;

0 commit comments

Comments
 (0)