Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: support strict: true in @sanity/schema codebase #6207

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

stipsan
Copy link
Member

@stipsan stipsan commented Apr 4, 2024

Description

This change was done in #5983 and is required for #5983 to land. But as that PR is already quite large it's split up into its own PR to reduce the cognitive load for reviewers.
The objective is first and foremost to remove the requirement for these in the tsconfig for @sanity/schema:

{
  "noUnusedLocals": false,
  "strict": false
}

so that all our packages use the same compiler settings and can be used with compilerOptions.paths for IDE and language service features that can typecheck code between packages without first needing to save the file, or build the package.
Note that this compilerOptions.paths setup is implemented in #5983, this PR lays the groundwork for it.

What to review

Everything should continue to build, this is a TS concern and generated JS should be identical.

Testing

If the CI pass we're good, no manual testing needed.

Notes for release

N/A

Copy link

vercel bot commented Apr 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
performance-studio ✅ Ready (Inspect) Visit Preview Apr 4, 2024 8:13am
test-studio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2024 8:13am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
studio-workshop ⬜️ Ignored (Inspect) Visit Preview Apr 4, 2024 8:13am

Copy link

socket-security bot commented Apr 4, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@types/inquirer@6.5.0 None +1 73.4 kB types
npm/@types/is-hotkey@0.1.10 None 0 5.68 kB types
npm/@types/jsdom@20.0.1 None +1 35.8 kB types
npm/@types/lodash@4.17.0 None 0 862 kB types
npm/@types/log-symbols@2.0.0 None 0 2.7 kB types
npm/@types/minimist@1.2.5 None 0 6.27 kB types
npm/@types/moment@2.13.0 None 0 508 B types
npm/@types/node-ipc@9.2.3 None 0 20.6 kB types
npm/@types/node@18.19.29 None 0 1.96 MB types
npm/@types/object-inspect@1.13.0 None 0 6.05 kB types
npm/@types/raf@3.4.3 None 0 2.85 kB types
npm/@types/react-copy-to-clipboard@5.0.7 None 0 4.36 kB types
npm/@types/react-dom@18.2.23 None 0 34.9 kB types
npm/@types/react-is@18.2.4 None 0 5.67 kB types
npm/@types/react@18.2.74 None +1 438 kB types
npm/@types/refractor@3.4.1 None +1 47 kB types
npm/@types/resolve-from@4.0.0 None 0 3.04 kB types
npm/@types/rimraf@3.0.2 None 0 7.5 kB types
npm/@types/semver-compare@1.0.3 None 0 2.97 kB types
npm/@types/semver@6.2.7 None 0 13.5 kB types
npm/@types/semver@7.5.8 None 0 23.3 kB types
npm/@types/shallow-equals@1.0.3 None 0 2.86 kB types
npm/@types/speakingurl@13.0.6 None 0 3.96 kB types
npm/@types/tar-fs@2.0.4 None 0 5.96 kB types
npm/@types/tar-stream@3.1.3 None 0 7.85 kB types
npm/@types/tar@6.1.11 None 0 29.8 kB types
npm/@types/three@0.150.2 None +2 926 kB types
npm/@types/use-sync-external-store@0.0.6 None 0 3.29 kB types
npm/@types/validate-npm-package-name@3.0.3 None 0 5.2 kB types
npm/@types/which@2.0.2 None 0 6.06 kB types
npm/@types/ws@8.5.10 None 0 21.7 kB types
npm/@types/yargs@17.0.32 None +1 68.8 kB types
npm/@typescript-eslint/eslint-plugin@7.5.0 None +9 5.31 MB jameshenry
npm/@typescript-eslint/parser@7.5.0 None +4 1.37 MB jameshenry
npm/@uiw/react-codemirror@4.21.25 None +4 1.16 MB wcjiang
npm/@vercel/frameworks@1.6.0 filesystem Transitive: eval +1 312 kB vercel-release-bot
npm/@vercel/fs-detectors@4.1.3 environment, filesystem, shell +2 277 kB vercel-release-bot
npm/@vercel/stega@0.1.0 None 0 25.4 kB vercel-release-bot
npm/@vitejs/plugin-react@4.2.1 None +3 64.1 kB vitebot
npm/archiver@7.0.1 filesystem +3 880 kB ctalkington
npm/arrify@2.0.1 None 0 3.19 kB sindresorhus
npm/async-mutex@0.4.1 None 0 54.7 kB dirtyhairy
npm/boxen@4.2.0 None +2 27.8 kB sindresorhus
npm/cac@6.7.14 None 0 81.8 kB egoist

View full report↗︎

Copy link
Contributor

github-actions bot commented Apr 4, 2024

No changes to documentation

Copy link
Contributor

github-actions bot commented Apr 4, 2024

Component Testing Report Updated Apr 4, 2024 8:17 AM (UTC)

File Status Duration Passed Skipped Failed
comments/CommentInput.spec.tsx ✅ Passed (Inspect) 31s 15 0 0
formBuilder/ArrayInput.spec.tsx ✅ Passed (Inspect) 6s 3 0 0
formBuilder/inputs/PortableText/Annotations.spec.tsx ✅ Passed (Inspect) 24s 6 0 0
formBuilder/inputs/PortableText/copyPaste/CopyPaste.spec.tsx ✅ Passed (Inspect) 12s 4 2 0
formBuilder/inputs/PortableText/Decorators.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/FocusTracking.spec.tsx ✅ Passed (Inspect) 32s 15 0 0
formBuilder/inputs/PortableText/Input.spec.tsx ✅ Passed (Inspect) 1m 0s 14 0 0
formBuilder/inputs/PortableText/ObjectBlock.spec.tsx ✅ Passed (Inspect) 59s 18 0 0
formBuilder/inputs/PortableText/RangeDecoration.spec.tsx ✅ Passed (Inspect) 12s 6 0 0
formBuilder/inputs/PortableText/Styles.spec.tsx ✅ Passed (Inspect) 13s 6 0 0
formBuilder/inputs/PortableText/Toolbar.spec.tsx ✅ Passed (Inspect) 19s 9 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant