fix(dot-notation): ignore non-ascii property names#840
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. |
There was a problem hiding this comment.
Pull request overview
Fixes dot-notation false positives for non-ASCII property names by avoiding dot-notation suggestions when the computed property name contains non-ASCII characters (e.g., accents, Greek letters).
Changes:
- Add an ASCII-only identifier check to gate dot-notation suggestions for
obj['prop']style access. - Update rule tests to treat non-ASCII property names (e.g.,
Prénom,π) as valid bracket-notation usage. - Update the dot-notation snapshot to reflect the adjusted invalid test set.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/rules/dot_notation/dot_notation.go | Changes identifier eligibility logic to skip dot-notation suggestions for non-ASCII names. |
| internal/rules/dot_notation/dot_notation_test.go | Adds valid cases for non-ASCII property names; removes prior invalid expectation for π. |
| internal/rule_tester/snapshots/dot-notation.snap | Updates expected diagnostics due to removed invalid test case. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
67e3452 to
48dc875
Compare
Merge activity
|
48dc875 to
932eca5
Compare
932eca5 to
a712148
Compare

fixes #828