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

Allow $schema field in parcelrc config #8059

Merged
merged 1 commit into from May 17, 2022

Conversation

lukaw3d
Copy link
Contributor

@lukaw3d lukaw3d commented May 5, 2022

↪️ Pull Request

Related to #7975

💻 Examples

🚨 Test instructions

Build using .parcelrc with code completion:

{
  "$schema": "https://raw.githubusercontent.com/lukaw3d/parcel-bundler-json-schemas/6b524b3/config_schema.json",
  "extends": "@parcel/config-default"
}

✔️ PR Todo

  • Added/updated unit tests for this change
  • Filled out test instructions (In case there aren't any unit tests)
  • Included links to related issues/PRs

@devongovett
Copy link
Member

Maybe we could host the json schema on parceljs.org too. And perhaps send a PR to vscode so it picks that up automatically (I think here: https://github.com/microsoft/vscode/blob/d851ea5d49b0ec89b98765d9e0084c25f2ff5031/extensions/typescript-language-features/package.json)

@lukaw3d
Copy link
Contributor Author

lukaw3d commented May 8, 2022

That would be great!

I don't know if VSCode has some place to add it
(other than creating a Parceljs extension with contributes.jsonValidation. typescript-language-features/package.json contributes.jsonValidation seems very typescript-core oriented, mainly listing typings.json, tsconfig.json, jsconfig.json 🤷 )

Sadly vscode doesn't yet use SchemaStore catalog, but could still add it there. E.g.

{
    "name": ".parcelrc",
    "description": "Parcel bundler configuration file",
    "fileMatch": [".parcelrc"],
    "url": "https://raw.githubusercontent.com/parcel-bundler/parcel/v2/parcelrc.schema.json"
}

@devongovett devongovett merged commit 8981c88 into parcel-bundler:v2 May 17, 2022
@gberaudo
Copy link

Hi, has the versioned $chema been released somewhere? I do not find it in the code, nor on the website.
In the mean time I am using "https://raw.githubusercontent.com/lukaw3d/parcel-bundler-json-schemas/6b524b3/config_schema.json".

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.

None yet

3 participants