Avatar for the biomejs user
biomejs
biome
BlogDocsChangelog

fix(lint/useOptionalChain): unsafe fix incorrectly discards conditions in logical and chains

#1685Merged
Comparing
lucasweng:lint/1656
(
26d6e52
) with
main
(
c2dd5f0
)
CodSpeed Performance Gauge
0%
Improvements
0
Regressions
0
Untouched
82
New
0
Dropped
0
Ignored
11

Benchmarks

Passed

jquery.min.js[uncached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::jquery.min.js[uncached]
CodSpeed Performance Gauge
+4%
30.8 ms
29.7 ms
materialize.css[cached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::materialize.css[cached]
CodSpeed Performance Gauge
+2%
32.7 ms
31.9 ms
pixi.min.js[uncached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::pixi.min.js[uncached]
CodSpeed Performance Gauge
+2%
139.5 ms
136.4 ms
js_formatter[parser.ts]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[parser.ts]
CodSpeed Performance Gauge
+1%
21.5 ms
21.2 ms
vue.global.prod.js[cached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::vue.global.prod.js[cached]
CodSpeed Performance Gauge
+1%
45.4 ms
44.8 ms
ios.d.ts[cached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::ios.d.ts[cached]
CodSpeed Performance Gauge
+1%
268.6 ms
265.3 ms
foundation.css[cached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::foundation.css[cached]
CodSpeed Performance Gauge
+1%
29.5 ms
29.1 ms
three.min.js[cached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::three.min.js[cached]
CodSpeed Performance Gauge
+1%
141.8 ms
140.3 ms
checker.ts[cached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::checker.ts[cached]
CodSpeed Performance Gauge
+1%
259.4 ms
256.8 ms
jquery.min.js[cached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::jquery.min.js[cached]
CodSpeed Performance Gauge
+1%
28.6 ms
28.3 ms
react.production.min.js[uncached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::react.production.min.js[uncached]
CodSpeed Performance Gauge
+1%
2.2 ms
2.1 ms
semantic.css[cached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::semantic.css[cached]
CodSpeed Performance Gauge
+1%
139.2 ms
138.1 ms
js_formatter[jquery.min.js]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[jquery.min.js]
CodSpeed Performance Gauge
+1%
122.4 ms
121.5 ms
json_formatter[vue.global.prod.js]
xtask/bench/benches/json_formatter.rs::json_formatter::bench_json_formatter::json_formatter[vue.global.prod.js]
CodSpeed Performance Gauge
+1%
184.7 ms
183.4 ms
react-dom.production.min.js[uncached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::react-dom.production.min.js[uncached]
CodSpeed Performance Gauge
+1%
40.5 ms
40.2 ms
bootstrap.css[cached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::bootstrap.css[cached]
CodSpeed Performance Gauge
+1%
45.7 ms
45.5 ms
compiler.js[cached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::compiler.js[cached]
CodSpeed Performance Gauge
+1%
149.8 ms
149 ms
checker.ts[uncached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::checker.ts[uncached]
CodSpeed Performance Gauge
+1%
286.3 ms
284.8 ms
js_formatter[three.min.js]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[three.min.js]
CodSpeed Performance Gauge
+1%
608.9 ms
605.7 ms
three.min.js[uncached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::three.min.js[uncached]
CodSpeed Performance Gauge
0%
152 ms
151.4 ms
js_formatter[typescript.js]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[typescript.js]
CodSpeed Performance Gauge
0%
3.6 s
3.6 s
json_formatter[react.production.min.js]
xtask/bench/benches/json_formatter.rs::json_formatter::bench_json_formatter::json_formatter[react.production.min.js]
CodSpeed Performance Gauge
0%
7.6 ms
7.6 ms
js_formatter[checker.ts]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[checker.ts]
CodSpeed Performance Gauge
0%
947.4 ms
945.7 ms
ios.d.ts[uncached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::ios.d.ts[uncached]
CodSpeed Performance Gauge
0%
294.5 ms
294.1 ms
semantic.css[uncached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::semantic.css[uncached]
CodSpeed Performance Gauge
0%
147.7 ms
147.5 ms
d3.min.js[cached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::d3.min.js[cached]
CodSpeed Performance Gauge
0%
106.4 ms
106.3 ms
tex-chtml-full.js[uncached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::tex-chtml-full.js[uncached]
CodSpeed Performance Gauge
0%
292.6 ms
292.3 ms
analyzer[lint.ts]
xtask/bench/benches/analyzer.rs::analyzer::bench_analyzer::analyzer[lint.ts]
CodSpeed Performance Gauge
0%
24.7 ms
24.7 ms
analyzer[statement.ts]
xtask/bench/benches/analyzer.rs::analyzer::bench_analyzer::analyzer[statement.ts]
CodSpeed Performance Gauge
0%
41.8 ms
41.8 ms
analyzer[index.js]
xtask/bench/benches/analyzer.rs::analyzer::bench_analyzer::analyzer[index.js]
CodSpeed Performance Gauge
0%
32.3 ms
32.3 ms
analyzer[typescript.ts]
xtask/bench/benches/analyzer.rs::analyzer::bench_analyzer::analyzer[typescript.ts]
CodSpeed Performance Gauge
0%
67.4 ms
67.4 ms
analyzer[parser.ts]
xtask/bench/benches/analyzer.rs::analyzer::bench_analyzer::analyzer[parser.ts]
CodSpeed Performance Gauge
0%
46.7 ms
46.7 ms
bulma.css[cached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::bulma.css[cached]
CodSpeed Performance Gauge
0%
43.8 ms
43.8 ms
package-lock.json[cached]
xtask/bench/benches/json_parser.rs::json_parser::bench_json_parser::json_parser::package-lock.json[cached]
CodSpeed Performance Gauge
0%
6 ms
6 ms
json_formatter[jquery.min.js]
xtask/bench/benches/json_formatter.rs::json_formatter::bench_json_formatter::json_formatter[jquery.min.js]
CodSpeed Performance Gauge
0%
122.4 ms
122.4 ms
bootstrap.css[uncached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::bootstrap.css[uncached]
CodSpeed Performance Gauge
0%
49.7 ms
49.7 ms
package-lock.json[uncached]
xtask/bench/benches/json_parser.rs::json_parser::bench_json_parser::json_parser::package-lock.json[uncached]
CodSpeed Performance Gauge
0%
6.2 ms
6.2 ms
js_formatter[math.js]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[math.js]
CodSpeed Performance Gauge
0%
906.7 ms
906.8 ms
json_formatter[tex-chtml-full.js]
xtask/bench/benches/json_formatter.rs::json_formatter::bench_json_formatter::json_formatter[tex-chtml-full.js]
CodSpeed Performance Gauge
0%
1.1 s
1.1 s
tachyons.css[uncached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::tachyons.css[uncached]
CodSpeed Performance Gauge
0%
23.6 ms
23.6 ms
analyzer[router.ts]
xtask/bench/benches/analyzer.rs::analyzer::bench_analyzer::analyzer[router.ts]
CodSpeed Performance Gauge
0%
13.7 ms
13.7 ms
js_formatter[compiler.js]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[compiler.js]
CodSpeed Performance Gauge
0%
560.3 ms
560.5 ms
json_formatter[compiler.js]
xtask/bench/benches/json_formatter.rs::json_formatter::bench_json_formatter::json_formatter[compiler.js]
CodSpeed Performance Gauge
0%
559 ms
559.2 ms
json_formatter[typescript.js]
xtask/bench/benches/json_formatter.rs::json_formatter::bench_json_formatter::json_formatter[typescript.js]
CodSpeed Performance Gauge
0%
3.6 s
3.6 s
analyzer[css.js]
xtask/bench/benches/analyzer.rs::analyzer::bench_analyzer::analyzer[css.js]
CodSpeed Performance Gauge
0%
13.9 ms
13.9 ms
full.css[cached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::full.css[cached]
CodSpeed Performance Gauge
0%
502.2 ms
502.7 ms
js_formatter[vue.global.prod.js]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[vue.global.prod.js]
CodSpeed Performance Gauge
0%
184.5 ms
184.7 ms
typescript.js[uncached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::typescript.js[uncached]
CodSpeed Performance Gauge
0%
1.1 s
1.1 s
full.css[uncached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::full.css[uncached]
CodSpeed Performance Gauge
0%
523.4 ms
524.1 ms
json_formatter[pixi.min.js]
xtask/bench/benches/json_formatter.rs::json_formatter::bench_json_formatter::json_formatter[pixi.min.js]
CodSpeed Performance Gauge
0%
499.2 ms
500 ms
foundation.css[uncached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::foundation.css[uncached]
CodSpeed Performance Gauge
0%
31.1 ms
31.2 ms
json_formatter[math.js]
xtask/bench/benches/json_formatter.rs::json_formatter::bench_json_formatter::json_formatter[math.js]
CodSpeed Performance Gauge
0%
905.3 ms
907.3 ms
json_formatter[d3.min.js]
xtask/bench/benches/json_formatter.rs::json_formatter::bench_json_formatter::json_formatter[d3.min.js]
CodSpeed Performance Gauge
0%
453 ms
454 ms
js_formatter[react-dom.production.min.js]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[react-dom.production.min.js]
CodSpeed Performance Gauge
0%
145.9 ms
146.2 ms
tex-chtml-full.js[cached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::tex-chtml-full.js[cached]
CodSpeed Performance Gauge
0%
273.5 ms
274.2 ms
js_formatter[dojo.js]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[dojo.js]
CodSpeed Performance Gauge
0%
29.3 ms
29.4 ms
js_formatter[ios.d.ts]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[ios.d.ts]
CodSpeed Performance Gauge
0%
804.6 ms
806.8 ms
js_formatter[tex-chtml-full.js]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[tex-chtml-full.js]
CodSpeed Performance Gauge
0%
1.1 s
1.1 s
js_formatter[d3.min.js]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[d3.min.js]
CodSpeed Performance Gauge
0%
452 ms
453.6 ms
json_formatter[three.min.js]
xtask/bench/benches/json_formatter.rs::json_formatter::bench_json_formatter::json_formatter[three.min.js]
CodSpeed Performance Gauge
0%
606 ms
608.5 ms
js_formatter[pixi.min.js]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[pixi.min.js]
CodSpeed Performance Gauge
0%
498.7 ms
501 ms
pixi.min.js[cached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::pixi.min.js[cached]
CodSpeed Performance Gauge
-1%
125 ms
125.7 ms
math.js[cached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::math.js[cached]
CodSpeed Performance Gauge
-1%
206.3 ms
207.4 ms
compiler.js[uncached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::compiler.js[uncached]
CodSpeed Performance Gauge
-1%
166.8 ms
167.9 ms
materialize.css[uncached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::materialize.css[uncached]
CodSpeed Performance Gauge
-1%
35.3 ms
35.5 ms
typescript.js[cached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::typescript.js[cached]
CodSpeed Performance Gauge
-1%
983.3 ms
989.9 ms
js_formatter[router.ts]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[router.ts]
CodSpeed Performance Gauge
-1%
7.1 ms
7.2 ms
tachyons.css[cached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::tachyons.css[cached]
CodSpeed Performance Gauge
-1%
20.2 ms
20.4 ms
js_formatter[react.production.min.js]
xtask/bench/benches/js_formatter.rs::js_formatter::bench_js_formatter::js_formatter[react.production.min.js]
CodSpeed Performance Gauge
-1%
7.5 ms
7.6 ms
json_formatter[dojo.js]
xtask/bench/benches/json_formatter.rs::json_formatter::bench_json_formatter::json_formatter[dojo.js]
CodSpeed Performance Gauge
-1%
29 ms
29.3 ms
bulma.css[uncached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::bulma.css[uncached]
CodSpeed Performance Gauge
-1%
47.4 ms
47.8 ms
math.js[uncached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::math.js[uncached]
CodSpeed Performance Gauge
-1%
220.3 ms
222.9 ms
canada.json[cached]
xtask/bench/benches/json_parser.rs::json_parser::bench_json_parser::json_parser::canada.json[cached]
CodSpeed Performance Gauge
-1%
174.2 ms
176.4 ms
vue.global.prod.js[uncached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::vue.global.prod.js[uncached]
CodSpeed Performance Gauge
-1%
48.4 ms
49 ms
canada.json[uncached]
xtask/bench/benches/json_parser.rs::json_parser::bench_json_parser::json_parser::canada.json[uncached]
CodSpeed Performance Gauge
-1%
223.3 ms
226.4 ms
pure.css[uncached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::pure.css[uncached]
CodSpeed Performance Gauge
-2%
4.5 ms
4.6 ms
d3.min.js[uncached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::d3.min.js[uncached]
CodSpeed Performance Gauge
-2%
113.8 ms
115.9 ms
json_formatter[react-dom.production.min.js]
xtask/bench/benches/json_formatter.rs::json_formatter::bench_json_formatter::json_formatter[react-dom.production.min.js]
CodSpeed Performance Gauge
-2%
143.7 ms
146.8 ms
parser.ts[cached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::parser.ts[cached]
CodSpeed Performance Gauge
-2%
6.4 ms
6.5 ms
react-dom.production.min.js[cached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::react-dom.production.min.js[cached]
CodSpeed Performance Gauge
-3%
36.7 ms
37.9 ms
parser.ts[uncached]
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::parser.ts[uncached]
CodSpeed Performance Gauge
-3%
7 ms
7.2 ms
pure.css[cached]
xtask/bench/benches/css_parser.rs::css_parser::bench_css_parser::css_parser::pure.css[cached]
CodSpeed Performance Gauge
-5%
3.8 ms
4 ms

Ignored

dojo.js[cached]Ignored
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::dojo.js[cached]
CodSpeed Performance Gauge
-2%
8.3 ms
8.4 ms
dojo.js[uncached]Ignored
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::dojo.js[uncached]
CodSpeed Performance Gauge
-3%
9.4 ms
9.7 ms
react.production.min.js[cached]Ignored
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::react.production.min.js[cached]
CodSpeed Performance Gauge
+4%
2 ms
1.9 ms
router.ts[cached]Ignored
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::router.ts[cached]
CodSpeed Performance Gauge
0%
2.1 ms
2.1 ms
router.ts[uncached]Ignored
xtask/bench/benches/js_parser.rs::js_parser::bench_js_parser::js_parser::router.ts[uncached]
CodSpeed Performance Gauge
-5%
2.4 ms
2.5 ms
big5-added.json[cached]Ignored
xtask/bench/benches/json_parser.rs::json_parser::bench_json_parser::json_parser::big5-added.json[cached]
CodSpeed Performance Gauge
+1%
462 µs
459.6 µs
big5-added.json[uncached]Ignored
xtask/bench/benches/json_parser.rs::json_parser::bench_json_parser::json_parser::big5-added.json[uncached]
CodSpeed Performance Gauge
+2%
583.1 µs
570.3 µs
db.json[cached]Ignored
xtask/bench/benches/json_parser.rs::json_parser::bench_json_parser::json_parser::db.json[cached]
CodSpeed Performance Gauge
-2%
13.3 ms
13.6 ms
db.json[uncached]Ignored
xtask/bench/benches/json_parser.rs::json_parser::bench_json_parser::json_parser::db.json[uncached]
CodSpeed Performance Gauge
-4%
15.6 ms
16.2 ms
eucjp.json[cached]Ignored
xtask/bench/benches/json_parser.rs::json_parser::bench_json_parser::json_parser::eucjp.json[cached]
CodSpeed Performance Gauge
0%
856.1 µs
852.7 µs
eucjp.json[uncached]Ignored
xtask/bench/benches/json_parser.rs::json_parser::bench_json_parser::json_parser::eucjp.json[uncached]
CodSpeed Performance Gauge
-2%
998.4 µs
1,015.8 µs

Commits

Click on a commit to change the comparison range
Base
main
c2dd5f0
0%
Merge remote-tracking branch 'upstream/main' into lint/1656
26d6e52
11 months ago
by lucasweng
Home Terms PrivacyDocs