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

feat(typescript-estree): allow specifying project: true#6084

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

JoshuaKGoldberg
Copy link
Member

@JoshuaKGoldbergJoshuaKGoldberg commentedNov 25, 2022
edited
Loading

PR Checklist

Overview

Allows users to specifyparserOptions.project: true to indicate each file should be linted with the closesttsconfig.json to that file.

  • Initial draft working for "one-and-done" use case of
  • Get it to also work for watch mode, wheretsconfig.json files might be moved between lints
    • Work... ish. We won't know if someone moves atsconfig.json to re-lint a currently visible file in an IDE. But as soon as the file is changed, we'll know to re-check its relativetsconfig.json anyway.
  • Test it
  • Document it

Throwing up a draft now to be very visible about progress.

mkosir reacted with heart emojiomril1, akaltar, and mkosir reacted with rocket emoji
@nx-cloud
Copy link

nx-cloudbot commentedNov 25, 2022
edited
Loading

☁️ Nx Cloud Report

CI is running/has finished running commands for commit040a56a. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 47 targets

Sent with 💌 fromNxCloud.

@typescript-eslint
Copy link
Contributor

Thanks for the PR,@JoshuaKGoldberg!

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.

@netlify
Copy link

netlifybot commentedNov 25, 2022
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commit040a56a
🔍 Latest deploy loghttps://app.netlify.com/sites/typescript-eslint/deploys/63e56168d1e1600008e95fd8
😎 Deploy Previewhttps://deploy-preview-6084--typescript-eslint.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 yourNetlify site settings.

@JoshuaKGoldbergJoshuaKGoldberg added this to the6.0.0 milestoneNov 25, 2022
@bradzacher
Copy link
Member

bradzacher commentedNov 25, 2022
edited
Loading

Get it to also work for watch mode, where tsconfig.json files might be moved between lints

pleasekillme4

if only we had a way to attach watchers to the disk 😿

JoshuaKGoldberg reacted with laugh emoji

@codecov
Copy link

codecovbot commentedNov 25, 2022
edited
Loading

Codecov Report

Merging#6084 (040a56a) intomain (f330e06) willincrease coverage by0.00%.
The diff coverage is94.28%.

Additional details and impacted files
@@           Coverage Diff           @@##             main    #6084   +/-   ##=======================================  Coverage   91.52%   91.52%           =======================================  Files         371      372    +1       Lines       12651    12689   +38       Branches     3717     3730   +13     =======================================+ Hits        11579    11614   +35  Misses        754      754- Partials      318      321    +3
FlagCoverage Δ
unittest91.52% <94.28%> (+<0.01%)⬆️

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

Impacted FilesCoverage Δ
...pt-estree/src/parseSettings/createParseSettings.ts93.47% <66.66%> (-4.03%)⬇️
...pescript-estree/src/parseSettings/ExpiringCache.ts100.00% <100.00%> (+4.76%)⬆️
...-estree/src/parseSettings/getProjectConfigFiles.ts100.00% <100.00%> (ø)
...ipt-estree/src/parseSettings/resolveProjectList.ts91.11% <0.00%> (-4.45%)⬇️
...int-plugin/src/rules/strict-boolean-expressions.ts98.90% <0.00%> (+0.06%)⬆️

@JoshuaKGoldbergJoshuaKGoldberg changed the title[DRAFT] feat(typescript-estree): allow specifying project: truefeat(typescript-estree): allow specifying project: trueNov 25, 2022
@JoshuaKGoldbergJoshuaKGoldberg marked this pull request as ready for reviewNovember 25, 2022 08:35
@bradzacherbradzacher removed the awaiting responseIssues waiting for a reply from the OP or another party labelJan 19, 2023
bradzacher
bradzacher previously approved these changesJan 23, 2023
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.

we're like 99% of the way there - just need to handle cache lifetime and we gucci

vito_good

JoshuaKGoldbergand others added2 commitsJanuary 23, 2023 08:25
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
@bradzacherbradzacher added the awaiting responseIssues waiting for a reply from the OP or another party labelJan 30, 2023
@bradzacherbradzacher removed this from the6.0.0 milestoneJan 30, 2023
@bradzacherbradzacher added the enhancementNew feature or request labelJan 30, 2023
@JoshuaKGoldberg
Copy link
MemberAuthor

JoshuaKGoldberg commentedFeb 4, 2023
edited
Loading

ugh git

@JoshuaKGoldbergJoshuaKGoldberg removed the awaiting responseIssues waiting for a reply from the OP or another party labelFeb 5, 2023
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.

Overall this LGTM - so stamped

Before you land it - could you do a perf test just so we can update the docs with messaging around perf if we need to?

To test the perf I'd just use thetime tool against main then against your branch:

  • git checkout main && yarn && time ./node_modules/.bin/eslint .
  • git checkout parser-options-project-true && yarn && time ./node_modules/.bin/eslint .

You'll see a line like this:

./node_modules/.bin/eslint .  62.97s user 4.09s system 167% cpu 40.009 total

The first number is the one to compare.
I'd do a couple runs of each just to smooth any outlier slowness.

I'd expect this to be a little slower due to the lookup required for every file - but I think that with the caching you've built in it shouldn't be MUCH slower. For a big, deeply nested project they might find it has more of an impact.

If the difference is minuscule then I don't think we need to worry about any messaging, but if it's different enough one way or the other it's probably worth mentioning!

But this is why it'd be worth a test - just to see if it is actually different enough.


If you wanted you could go hog-ham and investigate the proper perf trace before and after:
#6366 (comment)

The thing that would be interesting to see would be the cost of thecreateParseSettings before and after as that's where your changes are.
Would be interesting to see the proper breakdown!

@JoshuaKGoldberg
Copy link
MemberAuthor

JoshuaKGoldberg commentedFeb 10, 2023
edited
Loading

  • main:./node_modules/.bin/eslint . 61.71s user 3.54s system 166% cpu 39.264 total
  • parser-options-project-true:./node_modules/.bin/eslint . 61.56s user 3.66s system 167% cpu 38.829 total

👌

@JoshuaKGoldbergJoshuaKGoldberg added this pull request to the merge queueFeb 10, 2023
@JoshuaKGoldbergJoshuaKGoldberg removed this pull request from the merge queue due to a manual requestFeb 10, 2023
@JoshuaKGoldbergJoshuaKGoldberg merged commitdcd05f0 intotypescript-eslint:mainFeb 10, 2023
@JoshuaKGoldbergJoshuaKGoldberg deleted the parser-options-project-true branchFebruary 10, 2023 03:34
@github-actionsgithub-actionsbot locked asresolvedand limited conversation to collaboratorsFeb 18, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@shawnmcknightshawnmcknightshawnmcknight left review comments

@bradzacherbradzacherbradzacher approved these changes

Assignees
No one assigned
Labels
enhancementNew feature or request
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Feature request: support looking up tsconfig.json relative to linted file
3 participants
@JoshuaKGoldberg@bradzacher@shawnmcknight

[8]ページ先頭

©2009-2025 Movatter.jp