Skip to content

Add the no-misplaced-attrs - #105

Merged
pedrobslisboa merged 1 commit into
mainfrom
pedrolisboa/no-misplaced-attrs
Jul 30, 2026
Merged

Add the no-misplaced-attrs#105
pedrobslisboa merged 1 commit into
mainfrom
pedrolisboa/no-misplaced-attrs

Conversation

@pedrobslisboa

@pedrobslisboa pedrobslisboa commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Creates a linter to warn about the wrong usage of [@json.name] on record fields

(* BAD: [@name] is ignored, the field serializes as "to_" *)
type params = { to_ : date [@name "to"] } [@@deriving json]

(* GOOD *)
type params = { to_ : date [@key "to"] } [@@deriving json]

@pedrobslisboa
pedrobslisboa force-pushed the pedrolisboa/no-misplaced-attrs branch 4 times, most recently from 4148d66 to 2bf4496 Compare July 15, 2026 00:32
@pedrobslisboa
pedrobslisboa marked this pull request as ready for review July 15, 2026 00:41
Base automatically changed from pedrolisboa/linter to main July 30, 2026 17:34
@pedrobslisboa
pedrobslisboa force-pushed the pedrolisboa/no-misplaced-attrs branch from 2bf4496 to d92a9cc Compare July 30, 2026 17:42
@pedrobslisboa
pedrobslisboa merged commit c1f48b1 into main Jul 30, 2026
9 checks passed
@pedrobslisboa
pedrobslisboa deleted the pedrolisboa/no-misplaced-attrs branch July 30, 2026 17:49
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.

1 participant