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

feat(rome_js_analyzer): new rule: useConst #3680

Merged
merged 36 commits into from
Nov 16, 2022
Merged

feat(rome_js_analyzer): new rule: useConst #3680

merged 36 commits into from
Nov 16, 2022

Conversation

95th
Copy link
Contributor

@95th 95th commented Nov 11, 2022

Summary

Implements eslint's prefer-const.

Test Plan

Unit tests.

@netlify
Copy link

netlify bot commented Nov 11, 2022

Deploy Preview for docs-rometools ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 99da02a
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/6373e5a6ffe98f000a5b0b30
😎 Deploy Preview https://deploy-preview-3680--docs-rometools.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@95th 95th changed the title Use const feat(rome_js_analyzer): new rule: useConst Nov 13, 2022
@95th 95th marked this pull request as ready for review November 14, 2022 07:45
@95th 95th requested a review from a team November 14, 2022 07:45
@95th 95th requested review from MichaReiser and removed request for xunilrj, ematipico and leops November 14, 2022 18:10
@MichaReiser MichaReiser added the A-Linter Area: linter label Nov 15, 2022
@MichaReiser MichaReiser requested a review from a team November 15, 2022 08:40
@MichaReiser MichaReiser added the L-JavaScript Langauge: JavaScript label Nov 15, 2022
@MichaReiser MichaReiser added this to the 11.0.0 milestone Nov 15, 2022
@MichaReiser
Copy link
Contributor

!bench_analyzer

@github-actions
Copy link

Analyzer Benchmark Results

group                     main                                   pr
-----                     ----                                   --
analyzer/css.js           1.00      2.1±0.01ms     5.6 MB/sec    1.00      2.1±0.01ms     5.7 MB/sec
analyzer/index.js         1.00      5.8±0.02ms     5.6 MB/sec    1.00      5.8±0.01ms     5.6 MB/sec
analyzer/lint.ts          1.00      2.9±0.01ms    14.2 MB/sec    1.00      2.9±0.01ms    14.1 MB/sec
analyzer/parser.ts        1.00      6.9±0.03ms     7.1 MB/sec    1.01      6.9±0.01ms     7.0 MB/sec
analyzer/router.ts        1.00      4.9±0.02ms    12.5 MB/sec    1.00      4.9±0.01ms    12.5 MB/sec
analyzer/statement.ts     1.00      6.8±0.03ms     5.2 MB/sec    1.00      6.8±0.01ms     5.2 MB/sec
analyzer/typescript.ts    1.00     10.3±0.06ms     5.3 MB/sec    1.01     10.4±0.03ms     5.2 MB/sec

) -> bool {
pat.properties()
.into_iter()
.filter_map(Result::ok)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think that's the same as .flatten()

@MichaReiser MichaReiser merged commit f4f22bd into rome:main Nov 16, 2022
@MichaReiser
Copy link
Contributor

Very well done. Thank you for implementing this surprisingly complicated rule!

@95th 95th deleted the use_const branch November 16, 2022 10:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Linter Area: linter L-JavaScript Langauge: JavaScript
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载