-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCargo.toml
122 lines (114 loc) · 4.8 KB
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[workspace]
resolver = "2"
members = ["crates/*", "napi/*", "wasm/*"]
[workspace.package]
authors = ["Dilshad <[email protected]>"]
categories = ["compilers", "development-tools", "web-programming"]
description = "A collection of Svelte tools written in Rust."
edition = "2021"
homepage = "https://github.com/ssc-project/ssc#readme"
keywords = ["compiler", "svelte"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/ssc-project/ssc"
rust-version = "1.74"
[workspace.lints.rust]
absolute_paths_not_starting_with_crate = "warn"
non_ascii_idents = "warn"
unit-bindings = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage)', 'cfg(coverage_nightly)'] }
[workspace.lints.clippy]
all = { level = "warn", priority = -1 }
empty_docs = { level = "allow", priority = 1 } # from `Tsify`
# restriction
dbg_macro = "warn"
todo = "warn"
unimplemented = "warn"
print_stdout = "warn" # must be opt-in
print_stderr = "warn" # must be opt-in
# I like the explicitness of this rule as it removes confusion around `clone`.
# This increases readability, avoids `clone` mindlessly and heap allocating on accident.
clone_on_ref_ptr = "warn"
# These two are mutually exclusive, I like `mod.rs` files for better fuzzy searches on module entries.
self_named_module_files = "warn" # "-Wclippy::mod_module_files"
empty_drop = "warn"
empty_structs_with_brackets = "warn"
exit = "warn"
filetype_is_file = "warn"
get_unwrap = "warn"
impl_trait_in_params = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
rest_pat_in_fully_bound_structs = "warn"
unnecessary_safety_comment = "warn"
undocumented_unsafe_blocks = "warn"
infinite_loop = "warn"
# I want to write the best Rust code so pedantic is enabled.
# We should only disable rules globally if they are either false positives, chaotic, or does not make sense.
pedantic = { level = "warn", priority = -1 }
# Allowed rules
# pedantic
# This rule is too pedantic, I don't want to force this because naming things are hard.
module_name_repetitions = "allow"
# All triggers are mostly ignored in our codebase, so this is ignored globally.
struct_excessive_bools = "allow"
too_many_lines = "allow"
# #[must_use] is creating too much noise for this codebase, it does not add much value except nagging
# the programmer to add a #[must_use] after clippy has been run.
# Having #[must_use] every where also hinders readability.
must_use_candidate = "allow"
# used_underscore_binding= "allow"
doc_markdown = "allow"
# nursery
# `const` functions do not make sense for our project because this is not a `const` library.
# This rule also confuses new comers and forces them to add `const` blindlessly without any reason.
missing_const_for_fn = "allow"
# cargo
cargo = { level = "warn", priority = -1 }
multiple_crate_versions = "allow"
cargo_common_metadata = "allow" # TODO: fix this
[workspace.dependencies]
assert-unchecked = "0.1.2"
bitflags = "2.5.0"
memchr = "2.7.2"
num-bigint = "0.4.4"
num-traits = "0.2.18"
rustc-hash = "2.0.0"
seq-macro = "0.3.5"
static_assertions = "1.1.0"
base64 = "0.22.0"
serde = "1.0.119"
serde_json = "1.0.116"
ouroboros = "0.18.3"
tsify = "0.4.5"
wasm-bindgen = "0.2"
serde-wasm-bindgen = "0.6.5"
miette = "7.2.0"
tokio = "1"
napi = "2"
napi-derive = "2"
napi-build = "2"
# Oxc
oxc_allocator = "0.24.0"
oxc_ast = "0.24.0"
oxc_diagnostics = "0.24.0"
oxc_parser = { version = "0.24.0", path = "crates/oxc_parser" }
oxc_span = "0.24.0"
oxc_syntax = "0.24.0"
oxc_sourcemap = "0.24.0"
oxc_codegen = "0.24.0"
oxc_index = "0.24.0"
# Ssc
ssc = { version = "0.1.0", path = "crates/ssc" }
ssc_analyzer = { version = "0.1.0", path = "crates/ssc_analyzer" }
ssc_ast = { version = "0.1.0", path = "crates/ssc_ast" }
ssc_css_ast = { version = "0.1.0", path = "crates/ssc_css_ast" }
ssc_parser = { version = "0.1.0", path = "crates/ssc_parser" }
ssc_codegen = { version = "0.1.0", path = "crates/ssc_codegen" }
ssc_transformer = { version = "0.1.0", path = "crates/ssc_transformer" }
ssc_css_codegen = { version = "0.1.0", path = "crates/ssc_css_codegen" }
ssc_css_parser = { version = "0.1.0", path = "crates/ssc_css_parser" }
ssc_css_transformer = { version = "0.1.0", path = "crates/ssc_css_transformer" }
ssc_css_analyzer = { version = "0.1.0", path = "crates/ssc_css_analyzer" }
[workspace.metadata.cargo-shear]
ignored = ["napi"]