eslint-plugin-ember
eslint-plugin-ember copied to clipboard
Determine Property Types in Native Classes
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']
- Create separate naming conventions for new properties since getters/setters ≠
ToDo
- In separate PR
- Consume new helper in
reportUnorderedPropertiesand wire-up to order-in-* rules - Update docs and default values for order-in-* rules
- Consume new helper in
looks like some tests are failing