Skip to content

add nx schemas #4866

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add nx schemas #4866

wants to merge 1 commit into from

Conversation

mdjohns
Copy link

@mdjohns mdjohns commented Jul 24, 2025

This PR adds schemas for Nx's project.json and nx.json.

Copy link
Contributor

Thanks for the PR!

This section of the codebase is owned by @madskristensen and @hyperupcall - if they write a comment saying "LGTM" then it will be merged.

@hyperupcall
Copy link
Member

Thanks - unfortunately project.json is a bit too generic and will have too many false positives. Is there an alternative?

@mdjohns
Copy link
Author

mdjohns commented Jul 27, 2025

it looks like the conflict is with this:

{
"name": "project.json",
"description": "ASP.NET vNext project configuration file",
"fileMatch": ["project.json"],
"url": "https://www.schemastore.org/project.json",
"versions": {
"1.0.0-beta3": "https://www.schemastore.org/project-1.0.0-beta3.json",
"1.0.0-beta4": "https://www.schemastore.org/project-1.0.0-beta4.json",
"1.0.0-beta5": "https://www.schemastore.org/project-1.0.0-beta5.json",
"1.0.0-beta6": "https://www.schemastore.org/project-1.0.0-beta6.json",
"1.0.0-beta8": "https://www.schemastore.org/project-1.0.0-beta8.json",
"1.0.0-rc1": "https://www.schemastore.org/project-1.0.0-rc1.json",
"1.0.0-rc1-update1": "https://www.schemastore.org/project-1.0.0-rc1.json",
"1.0.0-rc2": "https://www.schemastore.org/project-1.0.0-rc2.json"
}
},

I'm not super familiar, but it appears to be a deprecated format according to Microsoft's docs (see here).

If I add project.json to the exclusions here, the validation succeeds for me locally:

"fileMatchConflict": [
// Name conflicts must be avoided. Do not add additional items here
"plugin.yml",
".jsbeautifyrc",
"info.json",
"manifest.json",
"*.cryproj"
],

@hyperupcall thoughts on this solution? There's a comment that does explicitly say not to add additional exclusions, but I think it's unlikely that someone would be using Nx and this (maybe deprecated) Nuget format.

{
"name": "Nx Project Schema",
"description": "Configuration file for the Nx CLI and project defaults. Documentation: https://nx.dev/reference/project-configuration",
"fileMatch": ["project.json"],
Copy link
Contributor

Choose a reason for hiding this comment

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

can you find a less generic name for the file match? Could you perhaps include the folder name that it always is located in, for instance?

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.

3 participants