Skip to content

Commit

Permalink
remove regex for now
Browse files Browse the repository at this point in the history
  • Loading branch information
KubaJastrz committed May 10, 2024
1 parent e423453 commit 9c717aa
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions crates/oxc_linter/src/rules/eslint/object_shorthand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use oxc_diagnostics::{
};
use oxc_macros::declare_oxc_lint;
use oxc_span::Span;
use regex::Regex;

use crate::{context::LintContext, rule::Rule, AstNode};

Expand Down Expand Up @@ -48,7 +47,7 @@ pub struct ObjectShorthandConfig {
avoid_quotes: bool,
ignore_constructors: bool,
avoid_explicit_return_arrows: bool,
methods_ignore_pattern: Option<Regex>,
methods_ignore_pattern: Option<String>,
}

impl std::ops::Deref for ObjectShorthand {
Expand Down Expand Up @@ -126,13 +125,11 @@ impl Rule for ObjectShorthand {
methods_ignore_pattern: obj2
.and_then(|v| v.get("methodsIgnorePattern"))
.and_then(serde_json::Value::as_str)
.and_then(|pattern| Regex::new(pattern).ok()),
.and_then(|v| Some(v.to_string())),
}))
}

fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) {
println!("{:?}", self);
}
fn run<'a>(&self, node: &AstNode<'a>, ctx: &LintContext<'a>) {}
}

#[derive(Debug, Default, Clone)]
Expand Down

0 comments on commit 9c717aa

Please sign in to comment.