Skip to content

Commit

Permalink
feat(swc_core): Expose ES linter (#8635)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 authored Feb 13, 2024
1 parent 9b36e7f commit 762959c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions crates/swc_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ ecma_quote = [
# Enable swc_ecma_utils
ecma_utils = ["__utils", "__common"]

ecma_lints = ["__ecma_lints", "__common"]

# Enable swc_ecma_transforms base features
ecma_transforms = ["__ecma_transforms"]
ecma_transforms_compat = ["__ecma_transforms", "swc_ecma_transforms_compat"]
Expand Down Expand Up @@ -312,6 +314,7 @@ __cached = ["swc_cached"]
__common = ["swc_common"]
__css = []
__ecma = ["swc_ecma_transforms_base"]
__ecma_lints = ["swc_ecma_lints"]
__ecma_loader = ["__ecma", "swc_ecma_loader"]
__ecma_transforms = ["__ecma"]
__parser = ["__ecma", "swc_ecma_parser"]
Expand Down Expand Up @@ -341,6 +344,7 @@ swc_css_utils = { optional = true, version = "0.137.18", path
swc_css_visit = { optional = true, version = "0.139.18", path = "../swc_css_visit" }
swc_ecma_ast = { optional = true, version = "0.112.2", path = "../swc_ecma_ast" }
swc_ecma_codegen = { optional = true, version = "0.148.3", path = "../swc_ecma_codegen" }
swc_ecma_lints = { optional = true, version = "0.92.4", path = "../swc_ecma_lints" }
swc_ecma_loader = { optional = true, version = "0.45.19", path = "../swc_ecma_loader" }
swc_ecma_minifier = { optional = true, version = "0.192.4", path = "../swc_ecma_minifier" }
swc_ecma_parser = { optional = true, version = "0.143.3", path = "../swc_ecma_parser" }
Expand Down
7 changes: 7 additions & 0 deletions crates/swc_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ pub mod ecma {
pub use swc_ecma_usage_analyzer::*;
}

// visit* interfaces
#[cfg(feature = "ecma_lints")]
#[cfg_attr(docsrs, doc(cfg(feature = "ecma_lints")))]
pub mod lints {
pub use swc_ecma_lints::*;
}

// visit* interfaces
#[cfg(feature = "__visit")]
#[cfg_attr(docsrs, doc(cfg(feature = "__visit")))]
Expand Down

0 comments on commit 762959c

Please sign in to comment.