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
7 changes: 1 addition & 6 deletions crates/oxc_linter/src/rules/typescript/no_this_alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn no_this_destructure_diagnostic(span: Span) -> OxcDiagnostic {
#[derive(Debug, Default, Clone)]
pub struct NoThisAlias(Box<NoThisAliasConfig>);

#[derive(Debug, Clone)]
#[derive(Debug, Default, Clone)]
pub struct NoThisAliasConfig {
allow_destructuring: bool,
allow_names: FxHashSet<CompactStr>,
Expand All @@ -45,11 +45,6 @@ impl std::ops::Deref for NoThisAlias {
}
}

impl Default for NoThisAliasConfig {
fn default() -> Self {
Self { allow_destructuring: true, allow_names: FxHashSet::default() }
}
}
impl NoThisAlias {
fn is_allowed(&self, name: &str) -> bool {
self.allow_names.contains(name)
Expand Down
6 changes: 1 addition & 5 deletions crates/oxc_linter/tests/rule_configuration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ fn test_rule_default_matches_from_configuration_null() {
// When fixing a rule, ensure that either:
// 1. The Default implementation returns the same values as from_configuration(null), or
// 2. The from_configuration method is updated to return Default::default() when given null
let exceptions = [
"typescript/no-this-alias",
"unicorn/prefer-object-from-entries",
"unicorn/prefer-structured-clone",
];
let exceptions = ["unicorn/prefer-object-from-entries", "unicorn/prefer-structured-clone"];

// Iterate through all available linter rules
for rule in RULES.iter() {
Expand Down
Loading