Skip to content

feat: add prefer-object-shorthand rule#1478

Draft
scarf005 wants to merge 1 commit into
denoland:mainfrom
scarf005:feat/1184/prefer-object-shorthand
Draft

feat: add prefer-object-shorthand rule#1478
scarf005 wants to merge 1 commit into
denoland:mainfrom
scarf005:feat/1184/prefer-object-shorthand

Conversation

@scarf005
Copy link
Copy Markdown

Summary

  • add prefer-object-shorthand for { foo: foo } and { foo: function() {} }
  • provide quick fixes for property, method, async/generator, and computed-key shorthand cases
  • add the new rule to the rule registry and schema

Closes #1184

Report verbose object properties and function-valued methods that can use shorthand syntax and provide quick fixes for both forms.

Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Assisted-by: openai/gpt-5.4 on opencode
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 19, 2026

CLA assistant check
All committers have signed the CLA.

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.

Rule suggestion: prefer-object-shorthand

2 participants