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(rule-schema-to-typescript-types): clean up and make public#11633

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 commentedSep 26, 2025
edited
Loading

PR Checklist

Overview

Makes the package public instead of private. Two changes are made to the package to support public use:

  • The dependency onprettier is removed. Consumers will be expected to format using their own formatter.
  • The main export is renamed from the generalcompile() to the more specificschemaToTypes().

Also adds a docs page under/packages/rule-schema-to-typescript-types with a code sample and auto-generated docs for the one function.

The snapshot file differences are due to theprettier formatting being moved out ofcompile/schemaToTypes. Formatting previously was only done in some cases inside the function. Now it's always done in the consumingschemas.test.ts.

Co-authored-by:@fasttime

💖

kirkwaiblinger reacted with thumbs up emojifasttime and spanishpear reacted with hooray emoji
@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.

@netlifyNetlify
Copy link

netlifybot commentedSep 26, 2025
edited
Loading

Deploy Preview fortypescript-eslint ready!

NameLink
🔨 Latest commitea6b7c9
🔍 Latest deploy loghttps://app.netlify.com/projects/typescript-eslint/deploys/68dfb643583b330008e730ec
😎 Deploy Previewhttps://deploy-preview-11633--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 84 (🟢 up 6 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 92 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to yourNetlify project configuration.

@nx-cloudNx Cloud
Copy link

nx-cloudbot commentedSep 26, 2025
edited
Loading

View yourCI Pipeline Execution ↗ for commitea6b7c9

CommandStatusDurationResult
nx test eslint-plugin --coverage=false✅ Succeeded5m 15sView ↗
nx run-many -t lint✅ Succeeded3m 10sView ↗
nx run-many -t typecheck✅ Succeeded2m 3sView ↗
nx test typescript-estree --coverage=false✅ Succeeded20sView ↗
nx test eslint-plugin-internal --coverage=false✅ Succeeded10sView ↗
nx run types:build✅ Succeeded5sView ↗
nx run integration-tests:test✅ Succeeded4sView ↗
nx run generate-configs✅ Succeeded8sView ↗
Additional runs (29)✅ Succeeded...View ↗

☁️Nx Cloud last updated this comment at2025-10-03 11:55:44 UTC

@JoshuaKGoldbergJoshuaKGoldberg marked this pull request as ready for reviewSeptember 26, 2025 13:12
@codecovCodecov
Copy link

codecovbot commentedSep 26, 2025
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.74%. Comparing base (692d4ee) to head (ea6b7c9).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@##             main   #11633      +/-   ##==========================================- Coverage   90.96%   90.74%   -0.22%==========================================  Files         506      514       +8       Lines       51447    51947     +500       Branches     8493     8584      +91     ==========================================+ Hits        46797    47139     +342- Misses       4637     4794     +157- Partials       13       14       +1
FlagCoverage Δ
unittest90.74% <100.00%> (-0.22%)⬇️

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

Files with missing linesCoverage Δ
...chema-to-typescript-types/src/generateArrayType.ts57.89% <100.00%> (ø)
...hema-to-typescript-types/src/generateObjectType.ts72.91% <100.00%> (ø)
...ule-schema-to-typescript-types/src/generateType.ts49.52% <100.00%> (ø)
...chema-to-typescript-types/src/generateUnionType.ts64.28% <100.00%> (ø)
...rule-schema-to-typescript-types/src/optimizeAST.ts96.42% <100.00%> (ø)
...es/rule-schema-to-typescript-types/src/printAST.ts80.91% <100.00%> (ø)

... and2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@fasttimefasttime left a comment

Choose a reason for hiding this comment

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

Excited to see this coming online!

It looks like these lists could be updated to includerule-schema-to-typescript-types.

options:
-ast-spec
-eslint-plugin
-parser
-project-service
-rule-tester
-scope-manager
-tsconfig-utils
-type-utils
-types
-typescript-eslint
-typescript-estree
-utils
-visitor-keys
-website

options:
-ast-spec
-eslint-plugin
-parser
-project-service
-rule-tester
-scope-manager
-tsconfig-utils
-type-utils
-types
-typescript-eslint
-typescript-estree
-utils
-visitor-keys
-website

That would help users like me to submit issues specifically related to this tool.

JoshuaKGoldberg reacted with heart emoji
Co-authored-by: Francesco Trotta <github@fasttime.org>
@JoshuaKGoldberg
Copy link
MemberAuthor

@JamesHenry perhaps another Nx setup oddity?

eslint.config.mjs(21,22): error TS2307: Cannot find module 'typescript-eslint' or its corresponding type declarations.> tsc -b tsconfig.repo-config-files.json

kirkwaiblinger
kirkwaiblinger previously approved these changesSep 30, 2025
Copy link
Member

@kirkwaiblingerkirkwaiblinger left a comment

Choose a reason for hiding this comment

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

🎉

kirkwaiblinger
kirkwaiblinger previously approved these changesSep 30, 2025
@JoshuaKGoldbergJoshuaKGoldberg added the 1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge labelSep 30, 2025
@JoshuaKGoldberg
Copy link
MemberAuthor

JoshuaKGoldberg commentedOct 3, 2025
edited
Loading

Build failures look to be some kind of Nx dependency shenanigan. I don't reproduce them locally.

> tsc -b tsconfig.repo-config-files.jsonpackages/type-utils/src/TypeOrValueSpecifier.ts(2,34): error TS2307: Cannot find module '@typescript-eslint/utils/json-schema' or its corresponding type declarations.packages/type-utils/src/isTypeReadonly.ts(1,34): error TS2307: Cannot find module '@typescript-eslint/utils/json-schema' or its corresponding type declarations.packages/rule-tester/src/utils/getRuleOptionsSchema.ts(3,34): error TS2307: Cannot find module '@typescript-eslint/utils/json-schema' or its corresponding type declarations.packages/rule-schema-to-typescript-types/src/generateArrayType.ts(4,8): error TS2307: Cannot find module '@typescript-eslint/utils/json-schema' or its corresponding type declarations....

Edit: like the last batch, these went away after merging frommain. 🤷

@JoshuaKGoldbergJoshuaKGoldberg merged commit740a63f intotypescript-eslint:mainOct 3, 2025
62 of 65 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@kirkwaiblingerkirkwaiblingerkirkwaiblinger left review comments

@JamesHenryJamesHenryAwaiting requested review from JamesHenryJamesHenry is a code owner

@bradzacherbradzacherAwaiting requested review from bradzacherbradzacher is a code owner

+1 more reviewer

@fasttimefasttimefasttime left review comments

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
1 approval>=1 team member has approved this PR; we're now leaving it open for more reviews before we merge
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Enhancement: Turn rule-schema-to-typescript-types into a public reusable package
3 participants
@JoshuaKGoldberg@fasttime@kirkwaiblinger

[8]ページ先頭

©2009-2025 Movatter.jp