Skip to content

Commit 762959c

Browse files
authoredFeb 13, 2024
feat(swc_core): Expose ES linter (#8635)
1 parent 9b36e7f commit 762959c

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed
 

‎Cargo.lock

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/swc_core/Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ ecma_quote = [
9797
# Enable swc_ecma_utils
9898
ecma_utils = ["__utils", "__common"]
9999

100+
ecma_lints = ["__ecma_lints", "__common"]
101+
100102
# Enable swc_ecma_transforms base features
101103
ecma_transforms = ["__ecma_transforms"]
102104
ecma_transforms_compat = ["__ecma_transforms", "swc_ecma_transforms_compat"]
@@ -312,6 +314,7 @@ __cached = ["swc_cached"]
312314
__common = ["swc_common"]
313315
__css = []
314316
__ecma = ["swc_ecma_transforms_base"]
317+
__ecma_lints = ["swc_ecma_lints"]
315318
__ecma_loader = ["__ecma", "swc_ecma_loader"]
316319
__ecma_transforms = ["__ecma"]
317320
__parser = ["__ecma", "swc_ecma_parser"]
@@ -341,6 +344,7 @@ swc_css_utils = { optional = true, version = "0.137.18", path
341344
swc_css_visit = { optional = true, version = "0.139.18", path = "../swc_css_visit" }
342345
swc_ecma_ast = { optional = true, version = "0.112.2", path = "../swc_ecma_ast" }
343346
swc_ecma_codegen = { optional = true, version = "0.148.3", path = "../swc_ecma_codegen" }
347+
swc_ecma_lints = { optional = true, version = "0.92.4", path = "../swc_ecma_lints" }
344348
swc_ecma_loader = { optional = true, version = "0.45.19", path = "../swc_ecma_loader" }
345349
swc_ecma_minifier = { optional = true, version = "0.192.4", path = "../swc_ecma_minifier" }
346350
swc_ecma_parser = { optional = true, version = "0.143.3", path = "../swc_ecma_parser" }

‎crates/swc_core/src/lib.rs

+7
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ pub mod ecma {
135135
pub use swc_ecma_usage_analyzer::*;
136136
}
137137

138+
// visit* interfaces
139+
#[cfg(feature = "ecma_lints")]
140+
#[cfg_attr(docsrs, doc(cfg(feature = "ecma_lints")))]
141+
pub mod lints {
142+
pub use swc_ecma_lints::*;
143+
}
144+
138145
// visit* interfaces
139146
#[cfg(feature = "__visit")]
140147
#[cfg_attr(docsrs, doc(cfg(feature = "__visit")))]

0 commit comments

Comments
 (0)
Please sign in to comment.