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

feat: load config from deno.json #4327

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kotkoroid
Copy link

@kotkoroid kotkoroid commented Mar 15, 2025

Deno employs a dedicated configuration file named deno.json. This pull request introduces the capability to load commitlint configuration directly from deno.json, enabling developers using Deno to eliminate the need for a package.json file.

Description

I am opening this pull request as a draft to share the changes I've made, as some parts of the codebase are still unclear to me. I welcome feedback from more experienced contributors who can use this as a foundation. Additionally, my commit includes formatting changes made by formatter automatically executed when committing.

I have added check whether deno.json exists to isEsmModule function as deno.json (JSR) packages support ESM only.

Motivation and Context

Deno supports loading configuration from package.json, which allows commitlint to function seamlessly. However, if developers prefer to use only deno.json for their configuration without relying on a separate config file, this is currently not feasible, as commitlint exclusively loads its configuration from package.json.

How Has This Been Tested?

Currently, I am unable to pass the tests due to the modifications I've implemented.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

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

Successfully merging this pull request may close these issues.

1 participant