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 in JSON configuration file #63

Merged
merged 1 commit into from
Dec 7, 2024

Conversation

AdamVig
Copy link
Contributor

@AdamVig AdamVig commented Dec 4, 2024

Description

The $schema property can be used by editors to provide inline
documentation and validation in JSON files (see VS Code's
documentation

as an example).

Currently, the JSON schema for the dclint configuration file does
not allow $schema, so adding it causes a configuration validation
error and prevents the tool from starting.

This adds $schema to the configuration JSON schema and documents how
to use it.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update
  • Other (please describe):

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@AdamVig AdamVig marked this pull request as ready for review December 4, 2024 00:47
@zavoloklom zavoloklom self-assigned this Dec 4, 2024
@zavoloklom zavoloklom added the enhancement New feature or request label Dec 4, 2024
@zavoloklom
Copy link
Owner

Hi @AdamVig!
Thank you for your PR! It seems very useful!
Could you please change commit message to "feat: allow $schema in JSON configuration file" to match our commit convention.
I also added pre-commit hook with commitlint to make it easy in the future.

@AdamVig AdamVig force-pushed the allow-config-schema branch from b898227 to e057e11 Compare December 6, 2024 19:19
@AdamVig
Copy link
Contributor Author

AdamVig commented Dec 6, 2024

Hi @AdamVig! Thank you for your PR! It seems very useful! Could you please change commit message to "feat: allow $schema in JSON configuration file" to match our commit convention. I also added pre-commit hook with commitlint to make it easy in the future.

@zavoloklom Thanks for the reminder. I remember seeing this in the documentation and it just slipped my mind. All set now.

@zavoloklom
Copy link
Owner

@AdamVig Hi again!
Could you please also fix markwownlint warnings? You can check it locally by running: "npm run markdownlint" and you can also try to autofix it with: npm run prettier and npm run markdownlint:fix

@AdamVig AdamVig force-pushed the allow-config-schema branch from e057e11 to 18ac73a Compare December 6, 2024 21:42
@AdamVig
Copy link
Contributor Author

AdamVig commented Dec 6, 2024

@AdamVig Hi again! Could you please also fix markwownlint warnings? You can check it locally by running: "npm run markdownlint" and you can also try to autofix it with: npm run prettier and npm run markdownlint:fix

@zavoloklom Hadn't noticed that CI failed, thanks for the callout. Fixed now. The CI pipeline and tooling for this project are great!

The `$schema` property can be used by editors to provide inline
documentation and validation in JSON files (see [VS Code's
documentation](https://code.visualstudio.com/Docs/languages/json#_json-schemas-and-settings)
as an example).

Currently, the JSON schema for the `dclint` configuration file does
not allow `$schema`, so adding it causes a configuration validation
error and prevents the tool from starting.

This adds `$schema` to the configuration JSON schema and documents how
to use it.
@AdamVig AdamVig force-pushed the allow-config-schema branch from 18ac73a to 3ffd86b Compare December 6, 2024 21:42
@zavoloklom zavoloklom merged commit 32aa0a4 into zavoloklom:main Dec 7, 2024
11 checks passed
@zavoloklom
Copy link
Owner

@zavoloklom Hadn't noticed that CI failed, thanks for the callout. Fixed now. The CI pipeline and tooling for this project are great!

@AdamVig Thanks! Really glad to hear that.

@zavoloklom
Copy link
Owner

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants