Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

feat(rome_js_analyze): useIsArray#4701

Merged
Conaclos merged 1 commit into
rome:mainfrom
Conaclos:useIsArray
Jul 18, 2023
Merged

feat(rome_js_analyze): useIsArray#4701
Conaclos merged 1 commit into
rome:mainfrom
Conaclos:useIsArray

Conversation

@Conaclos

Copy link
Copy Markdown
Contributor

Summary

Implement no-instanceof-array under the name useIsArray.

Test Plan

Tests included.

@netlify

netlify Bot commented Jul 14, 2023

Copy link
Copy Markdown

Deploy Preview for docs-rometools canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit 0144a8e
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/64b68180cf2deb00089751ff

@github-actions github-actions Bot added A-Linter Area: linter A-Project Area: project configuration and loading A-Diagnostic Area: errors and diagnostics labels Jul 14, 2023
@Conaclos
Conaclos requested review from ematipico and removed request for ematipico July 14, 2023 22:21
@Conaclos
Conaclos marked this pull request as draft July 14, 2023 22:37
@github-actions github-actions Bot added A-Core Area: core A-Formatter Area: formatter A-Parser Area: parser A-Tooling Area: our own build, development, and release tooling labels Jul 15, 2023
@Conaclos
Conaclos marked this pull request as ready for review July 16, 2023 13:56
@Conaclos
Conaclos requested a review from ematipico July 16, 2023 13:56
@Conaclos

Conaclos commented Jul 16, 2023

Copy link
Copy Markdown
Contributor Author

@ematipico Before adding doc tests for new public functions. I would like some review of these.

I added several functions on SyntaxToken, SyntaxNode, and AstNode to simplify trivia handling. I would appreciate some review of this.

@denbezrukov

Copy link
Copy Markdown
Contributor

I'm wondering if there is a performance difference between [item] and iter::once(item).

@Conaclos

Copy link
Copy Markdown
Contributor Author

I'm wondering if there is a performance difference between [item] and iter::once(item).

I think it is optimized by the compiler and should not be noticeable.

@ematipico

Copy link
Copy Markdown
Contributor

!bench_analyzer

@github-actions

Copy link
Copy Markdown

Analyzer Benchmark Results

group                     main                                   pr
-----                     ----                                   --
analyzer/css.js           1.00      4.1±0.00ms     2.9 MB/sec    1.00      4.1±0.01ms     2.9 MB/sec
analyzer/index.js         1.00      8.1±0.02ms     3.5 MB/sec    1.00      8.1±0.01ms     3.5 MB/sec
analyzer/lint.ts          1.01      6.8±0.00ms     6.1 MB/sec    1.00      6.7±0.01ms     6.2 MB/sec
analyzer/parser.ts        1.00     12.8±0.02ms     3.8 MB/sec    1.01     12.9±0.04ms     3.8 MB/sec
analyzer/router.ts        1.00      4.4±0.00ms     7.3 MB/sec    1.00      4.4±0.02ms     7.2 MB/sec
analyzer/statement.ts     1.00     12.1±0.01ms     2.9 MB/sec    1.00     12.1±0.01ms     2.9 MB/sec
analyzer/typescript.ts    1.00     19.3±0.03ms     2.8 MB/sec    1.00     19.4±0.03ms     2.8 MB/sec

Comment thread crates/rome_rowan/src/syntax/node.rs Outdated
Comment thread crates/rome_rowan/src/syntax/node.rs Outdated
Comment thread crates/rome_rowan/src/syntax/trivia.rs Outdated
Comment thread crates/rome_rowan/src/syntax/token.rs Outdated
Comment thread crates/rome_rowan/src/syntax/trivia.rs Outdated
Comment thread crates/rome_rowan/src/ast/mod.rs
@Conaclos
Conaclos requested a review from ematipico July 17, 2023 19:51
Comment thread crates/rome_js_analyze/tests/specs/nursery/useIsArray/valid.js
@Conaclos
Conaclos merged commit 1349452 into rome:main Jul 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A-Core Area: core A-Diagnostic Area: errors and diagnostics A-Formatter Area: formatter A-Linter Area: linter A-Parser Area: parser A-Project Area: project configuration and loading A-Tooling Area: our own build, development, and release tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants