-
-
Notifications
You must be signed in to change notification settings - Fork 26
feat: add support for headless rule config #258
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
base: main
Are you sure you want to change the base?
Conversation
How to use the Graphite Merge QueueAdd the label 0-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
a943347 to
083a2ae
Compare
|
@camc314 I'd appreciate your early thoughts on this direction. I'd love to find a way to avoid rewriting every rule to be compatible with accepting JSON input. |
|
Sorry @auvred I should have pinged you too last night! You're much more familiar with Go than I am, so perhaps there is a more idiomatic way of handling this. With the current approach, we would need to manually (or have AI) write a function for every rule that allows accepting |
|
As stated in #51 (comment), the main issue is that Go structs don't allow expressing typescript-eslint options one-to-one. If I were doing this, I'd write (or try to find) a Go code generator that takes typescript-eslint meta.schema (JSON Schema) and generates a small, interface-based typed deserializer for each rule. |
|
Is there any update on progress towards the go struct/typescript-eslint option mapping? don't want to be pushy, just really looking forward to this so we can give it a spin! Thanks! |
|
@osdiab I've been busy with other things, but I am actively working on this again, so I hope to have it usable in oxlint in the next month or so. |
cac1083 to
12bd84b
Compare
Coming soon: The Renovate bot (GitHub App) will be renamed to Mend. PRs from Renovate will soon appear from 'Mend'. Learn more [here](https://redirect.github.com/renovatebot/renovate/discussions/37842). This PR contains the following updates: | Package | Update | Change | |---|---|---| | typescript-go | digest | `1ca5a2d` -> `865ec14` | --- 📅 **Schedule**: Branch creation - "before 9am" in timezone Asia/Shanghai, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/tsgolint). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45Ny4xMCIsInVwZGF0ZWRJblZlciI6IjQxLjk3LjEwIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: github-actions <github-actions[bot]@users.noreply.github.com>
12bd84b to
6c69614
Compare

This is an initial pass at supporting rule configurations in headless mode. We currently do not pass any options along, but this allows passing an
optionsfield in the headless payload with each rule which will get serialized and pass along to the rule. We will need to be careful about how we handle the configs and validate the input coming in. However, this should be a backwards compatible change since it only adds a new field to the existing payload.I believe we'll need to update each rule to allow getting valid options from an arbitrary map type.