Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(eslint-plugin): [no-implied-eval] improve performance#4313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

mikeauclair
Copy link
Contributor

@mikeauclairmikeauclair commentedDec 15, 2021
edited
Loading

PR Checklist

Overview

Shifts the acquisition of type information inno-implied-eval down into thecalleeName === FUNCTION_CONSTRUCTOR block because

  • That's the only place that it is consumed
  • Most nodeswon't be function constructors (or zero will be if you're usingno-new-func in the base eslint ruleset)

My team has been running this change (as a forked rule in our custom rules package) for a few days in CI on our fairly-large application and it's shaved ~25% off of over all runtime

baileyandy reacted with thumbs up emoji
@nx-cloud
Copy link

nx-cloudbot commentedDec 15, 2021
edited
Loading

☁️ Nx Cloud Report

CI ran the following commands for commitee35742. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 44 targets

Sent with 💌 fromNxCloud.

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@mikeauclair!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently onhttps://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitorsper day.

@netlify
Copy link

netlifybot commentedDec 15, 2021
edited
Loading

✔️ Deploy Preview fortypescript-eslint ready!

🔨 Explore the source changes:ee35742

🔍 Inspect the deploy log:https://app.netlify.com/sites/typescript-eslint/deploys/61b9e2f018a9d200074e286a

😎 Browse the preview:https://deploy-preview-4313--typescript-eslint.netlify.app

@codecov
Copy link

codecovbot commentedDec 15, 2021
edited
Loading

Codecov Report

Merging#4313 (ee35742) intomain (6626bd2) willincrease coverage by0.26%.
The diff coverage is100.00%.

@@            Coverage Diff             @@##             main    #4313      +/-   ##==========================================+ Coverage   93.92%   94.19%   +0.26%==========================================  Files         174      152      -22       Lines        9689     8090    -1599       Branches     3019     2586     -433     ==========================================- Hits         9100     7620    -1480+ Misses        354      266      -88+ Partials      235      204      -31
FlagCoverage Δ
unittest94.19% <100.00%> (+0.26%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

Impacted FilesCoverage Δ
...ackages/eslint-plugin/src/rules/no-implied-eval.ts97.05% <100.00%> (ø)
...-estree/src/create-program/createDefaultProgram.ts
...ckages/typescript-estree/src/jsx/xhtml-entities.ts
packages/typescript-estree/src/simple-traverse.ts
...escript-estree/src/semantic-or-syntactic-errors.ts
...pt-estree/src/create-program/createWatchProgram.ts
...-internal/src/rules/no-typescript-estree-import.ts
packages/typescript-estree/src/convert-comments.ts
...-estree/src/create-program/createProjectProgram.ts
...plugin-internal/src/rules/prefer-ast-types-enum.ts
... and13 more

@armano2armano2 added performanceIssues regarding performance package: eslint-pluginIssues related to @typescript-eslint/eslint-plugin labelsDec 15, 2021
Copy link
Member

@bradzacherbradzacher left a comment

Choose a reason for hiding this comment

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

thanks for doing this!

mikeauclair reacted with thumbs up emoji
@bradzacherbradzacher changed the titlefix(eslint-plugin): [no-implied-eval] Only get type information in the branch that consumes itfix(eslint-plugin): [no-implied-eval] improve performanceDec 15, 2021
@bradzacherbradzacher merged commite344596 intotypescript-eslint:mainDec 15, 2021
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsJan 15, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@armano2armano2armano2 approved these changes

@bradzacherbradzacherbradzacher approved these changes

Assignees
No one assigned
Labels
package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginperformanceIssues regarding performance
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[no-implied-eval] Potential earlier exit for increased performance on large projects
3 participants
@mikeauclair@armano2@bradzacher

[8]ページ先頭

©2009-2025 Movatter.jp