Skip to content

chore: oxc.requireConfig search for .oxlintrc.jsonc too#110

Merged
Sysix merged 2 commits intomainfrom
03-03-chore_oxc.requireconfig_search_for_.oxlintrc.jsonc_too
Mar 4, 2026
Merged

chore: oxc.requireConfig search for .oxlintrc.jsonc too#110
Sysix merged 2 commits intomainfrom
03-03-chore_oxc.requireconfig_search_for_.oxlintrc.jsonc_too

Conversation

@Sysix
Copy link
Member

@Sysix Sysix commented Mar 3, 2026

Copy link
Member Author

Sysix commented Mar 3, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the VS Code extension’s oxc.requireConfig gating to recognize .oxlintrc.jsonc in addition to .oxlintrc.json, aligning behavior and documentation with upstream oxc config discovery.

Changes:

  • Extend config file globbing to include .oxlintrc.jsonc for startup gating and file watching.
  • Update user-facing descriptions/documentation to mention .oxlintrc.json(c).
  • Tighten repo linting by enabling typescript/no-floating-promises in oxlint.config.json.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
package.json Updates oxc.requireConfig setting description to mention .jsonc.
oxlint.config.json Enables typescript/no-floating-promises for stricter promise handling.
client/tools/linter.ts Adds .oxlintrc.jsonc to config detection glob and reuses it in several places.
README.md Updates documentation text for oxc.requireConfig.
Comments suppressed due to low confidence (1)

client/tools/linter.ts:44

  • The comment above allowedToStartServer still says requireConfig checks for a .oxlintrc.json file only, but the logic now also considers .oxlintrc.jsonc and oxlint.config.ts. Update the comment so it matches the current behavior.
const oxlintConfigDefaultFilePattern = `**/{.oxlintrc.json,.oxlintrc.jsonc,oxlint.config.ts}`;

export default class LinterTool implements ToolInterface {
  // Global flag to check if the user allows us to start the server.
  // When `oxc.requireConfig` is `true`, make sure one `.oxlintrc.json` file is present.
  private allowedToStartServer: boolean = false;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Sysix Sysix force-pushed the 03-03-chore_oxc.requireconfig_search_for_.oxlintrc.jsonc_too branch from 847984f to 729d30c Compare March 3, 2026 20:35
@Sysix Sysix force-pushed the 03-03-chore_oxc.requireconfig_search_for_.oxlintrc.jsonc_too branch from 729d30c to 946c4ca Compare March 3, 2026 20:40
@Sysix Sysix requested a review from Copilot March 4, 2026 21:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

client/tools/linter.ts:44

  • The comment above allowedToStartServer still says we only check for .oxlintrc.json, but the logic now also considers .oxlintrc.jsonc and oxlint.config.ts. Please update the comment so it matches the actual activation conditions (and stays correct if the pattern changes again).
  // Global flag to check if the user allows us to start the server.
  // When `oxc.requireConfig` is `true`, make sure one `.oxlintrc.json` file is present.
  private allowedToStartServer: boolean = false;

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Alexander S. <sysix@sysix-coding.de>
@Sysix Sysix marked this pull request as ready for review March 4, 2026 21:33
@Sysix Sysix merged commit ec126a8 into main Mar 4, 2026
2 checks passed
@Sysix Sysix deleted the 03-03-chore_oxc.requireconfig_search_for_.oxlintrc.jsonc_too branch March 4, 2026 21:35
Sysix added a commit that referenced this pull request Mar 4, 2026
commit ec126a8
Author: Alexander S. <sysix@sysix-coding.de>
Date:   Wed Mar 4 22:35:57 2026 +0100

    chore: `oxc.requireConfig` search for `.oxlintrc.jsonc` too (#110)

    * chore: `oxc.requireConfig` search for `.oxlintrc.jsonc` too

    * Apply suggestion from @Sysix

    Signed-off-by: Alexander S. <sysix@sysix-coding.de>

    ---------

    Signed-off-by: Alexander S. <sysix@sysix-coding.de>
Sysix added a commit that referenced this pull request Mar 5, 2026
* chore: set `oxc.unusedDisableDirectives` default value to null

* Squashed commit of the following:

commit ec126a8
Author: Alexander S. <sysix@sysix-coding.de>
Date:   Wed Mar 4 22:35:57 2026 +0100

    chore: `oxc.requireConfig` search for `.oxlintrc.jsonc` too (#110)

    * chore: `oxc.requireConfig` search for `.oxlintrc.jsonc` too

    * Apply suggestion from @Sysix

    Signed-off-by: Alexander S. <sysix@sysix-coding.de>

    ---------

    Signed-off-by: Alexander S. <sysix@sysix-coding.de>

* update docs
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.

2 participants