Skip to content

Conversation

@connorshea
Copy link

@connorshea connorshea commented Nov 23, 2025

It's basically just a string anyway.

Merge #8 first.

See also oxc-project/oxc#15978

Resolves oxc-project/oxc#15203

@Boshen Boshen merged commit 92b6b10 into oxc-project:main Nov 23, 2025
2 of 4 checks passed
connorshea pushed a commit that referenced this pull request Nov 23, 2025
## 🤖 New release

* `oxc-schemars`: 0.8.26 -> 0.8.27 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.8.27](oxc-schemars-v0.8.26...oxc-schemars-v0.8.27)
- 2025-11-23

### Fixed

- Regenerate the test snapshots.
([#11](#11))

### Other

- Add a JSON Schema implementation for the regex crate
([#9](#9))
- Update examples/tests so they pass again.
([#8](#8))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
graphite-app bot pushed a commit to oxc-project/oxc that referenced this pull request Nov 23, 2025
…ts (#15978)

~~Draft until we merge oxc-project/schemars#9 and upgrade the oxc-schemars crate in this repo afterwards. Once we have the schemars crate bumped up to 0.8.27 we can safely rebase this branch and this'll be ready to merge.~~

But I can confirm that this now works with my patch to schemars :D

Part of #14743.

Generated docs:

```md
## Configuration

This rule accepts a configuration object with the following properties:

### ignore

type: `string[]`

A list of patterns to ignore when checking `catch` variable names. The pattern
can be a string or regular expression.

### name

type: `string`

default: `"error"`

The name to use for error variables in `catch` blocks. You can customize it
to something other than `'error'` (e.g., `'exception'`).
```

Unfortunately it doesn't recognize the default value in this case, although I'm not 100% sure why. But at the very least, this works and allows us to finish the docs for most of the remaining lint rules.

```md
## Configuration

This rule accepts a configuration object with the following properties:

### rejectPattern

type: `[
  string,
  null
]`

Regex pattern used to validate the `reject` parameter name. If provided, this pattern
is used instead of the default `^_?reject$` check.

### resolvePattern

type: `[
  string,
  null
]`

Regex pattern used to validate the `resolve` parameter name. If provided, this pattern
is used instead of the default `^_?resolve$` check.
```
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.

Linter: Regex serialization for JsonSchema

2 participants