eslint-plugin-ember icon indicating copy to clipboard operation
eslint-plugin-ember copied to clipboard

Determine Property Types in Native Classes

Open dill-larson opened this issue 10 months ago • 1 comments

PR Category

  • New feature (code which adds functionality)

Requirement/Problem

Add ability to distinguish property/method types in Native JS classes, for later consumption of reportUnorderedProperties Relates to https://github.com/ember-cli/eslint-plugin-ember/issues/417

Solution

  • Create separate helper to separate logic for Ember Classic Objects vs. Ember Octane (Glimmer) Native Classes
    • Create separate naming conventions for new properties since getters/setters ≠ 'single-line-functions'
    • For consumption of order-in-* rule, users should specify them to be treated equally e.g. ['single-line-function', 'single-line-accessor'] e.g. ['actions', 'action']

ToDo

  • In separate PR
    • Consume new helper in reportUnorderedProperties and wire-up to order-in-* rules
    • Update docs and default values for order-in-* rules

dill-larson avatar Mar 30 '25 19:03 dill-larson

looks like some tests are failing

NullVoxPopuli avatar Apr 06 '25 22:04 NullVoxPopuli