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
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
{
"allowConstantLoopConditions": true,
"checkTypePredicates": false,
"allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": false
}
],
"typescript/only-throw-error": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,13 @@ pub struct NoUnnecessaryBooleanLiteralCompareConfig {
/// Whether to allow comparing nullable boolean expressions to `true`.
/// When false, `x === true` where x is `boolean | null` will be flagged.
pub allow_comparing_nullable_booleans_to_true: bool,
/// Whether to allow this rule to run without `strictNullChecks` enabled.
/// This is not recommended as the rule may produce incorrect results.
#[schemars(skip)]
pub allow_rule_to_run_without_strict_null_checks_i_know_what_i_am_doing: bool,
}

impl Default for NoUnnecessaryBooleanLiteralCompareConfig {
fn default() -> Self {
Self {
allow_comparing_nullable_booleans_to_false: true,
allow_comparing_nullable_booleans_to_true: true,
allow_rule_to_run_without_strict_null_checks_i_know_what_i_am_doing: false,
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ pub struct NoUnnecessaryConditionConfig {
pub allow_constant_loop_conditions: AllowConstantLoopConditions,
/// Whether to check type predicate functions.
pub check_type_predicates: bool,
/// DEPRECATED: Allow this rule to run without `strictNullChecks` enabled.
#[schemars(skip)]
pub allow_rule_to_run_without_strict_null_checks_i_know_what_i_am_doing: bool,
}

declare_oxc_lint!(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,8 @@ impl Default for IgnorePrimitives {

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase", default, deny_unknown_fields)]
#[expect(clippy::struct_field_names)]
pub struct PreferNullishCoalescingConfig {
/// Unless this is set to `true`, the rule will error on every file whose
/// `tsconfig.json` does _not_ have the `strictNullChecks` compiler option
/// (or `strict`) set to `true`.
///
/// It is _not_ recommended to enable this config option.
#[schemars(skip)]
pub allow_rule_to_run_without_strict_null_checks_i_know_what_i_am_doing: bool,
/// Whether to ignore arguments to the `Boolean` constructor.
pub ignore_boolean_coercion: bool,
/// Whether to ignore cases that are located within a conditional test.
Expand All @@ -70,7 +64,6 @@ pub struct PreferNullishCoalescingConfig {
impl Default for PreferNullishCoalescingConfig {
fn default() -> Self {
Self {
allow_rule_to_run_without_strict_null_checks_i_know_what_i_am_doing: false,
ignore_boolean_coercion: false,
ignore_conditional_tests: true,
ignore_if_statements: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ pub struct StrictBooleanExpressionsConfig {
pub allow_string: bool,
/// Whether to allow number types in boolean contexts (checks for non-zero numbers).
pub allow_number: bool,
/// Whether to allow this rule to run without `strictNullChecks` enabled.
/// This is not recommended as the rule may produce incorrect results.
#[schemars(skip)]
pub allow_rule_to_run_without_strict_null_checks_i_know_what_i_am_doing: bool,
}

impl Default for StrictBooleanExpressionsConfig {
Expand All @@ -43,7 +39,6 @@ impl Default for StrictBooleanExpressionsConfig {
allow_nullable_object: true,
allow_string: true,
allow_number: true,
allow_rule_to_run_without_strict_null_checks_i_know_what_i_am_doing: false,
}
}
}
Expand Down
Loading