ember-cli / ember-cli/eslint-plugin-ember

Rules that need autofixers

Open
#1,556 3 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
JavaScript
Stars
263
Forks
214
Avg merge
30m
Merged PRs (30d)
5

Description

List of rules where it should be easy / practical / useful to implement an autofixer:

* [jquery-ember-run](https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/jquery-ember-run.md)
* Add run loop?
* Low priority since jQuery use is discouraged already
* [no-array-prototype-extensions](https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-array-prototype-extensions.md) (one [Ember array function](https://api.emberjs.com/ember/4.7/classes/EmberArray) at a time)
* #1609
* #1611
* #1610
* #1614
* #1632
* #1631
* #1630
* #1619
* #1615
* #1628
* #1629
* #1627
* #1633
* #1621
* #1616
* #1620
* #1626
* #1617
* NEVERMIND: Observable properties (see [this comment](https://github.com/ember-cli/eslint-plugin-ember/pull/1632#issuecomment-1281047368) for why it's not easy to autofix these):
* [firstObject](https://api.emberjs.com/ember/4.7/classes/EmberArray/properties/firstObject?anchor=firstObject)
* [lastObject](https://api.emberjs.com/ember/4.7/classes/EmberArray/properties/lastObject?anchor=lastObject)
* NEVERMIND: [MutableArray](https://api.emberjs.com/ember/4.7/classes/MutableArray) (see [this comment](https://github.com/ember-cli/eslint-plugin-ember/pull/1632#issuecomment-1281047368) for why it's not easy to autofix these):
* [addObject](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/addObject?anchor=addObject)
* [addObjects](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/addObjects?anchor=addObjects)
* [clear](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/clear?anchor=clear)
* [insertAt](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/insertAt?anchor=insertAt)
* [popObject](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/popObject?anchor=popObject)
* [pushObject](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/pushObject?anchor=pushObject)
* [pushObjects](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/pushObjects?anchor=pushObjects)
* [removeAt](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/removeAt?anchor=removeAt)
* [removeObject](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/removeObject?anchor=removeObject)
* [removeObjects](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/removeObjects?anchor=removeObjects)
* [replace](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/replace?anchor=replace)
* [reverseObjects](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/reverseObjects?anchor=reverseObjects)
* [setObjects](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/setObjects?anchor=setObjects)
* [shiftObject](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/shiftObject?anchor=shiftObject)
* [unshiftObject](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/unshiftObject?anchor=unshiftObject)
* [unshiftObjects](https://api.emberjs.com/ember/4.7/classes/MutableArray/methods/unshiftObjects?anchor=unshiftObjects)
* [no-arrow-function-computed-properties](https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-arrow-function-computed-properties.md)
* Convert to non-arrow function
* [no-function-prototype-extensions](https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-function-prototype-extensions.md)
* [no-global-jquery](https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-global-jquery.md)
* Switch to imported jQuery
* [no-jquery](https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-jquery.md)
* As described in the rule doc, there's a codemod that helps with this already. Should any of it be incorporated into the rule for convenience or would that duplicate too much? Low priority since codemod already exists.
* [use-brace-expansion](https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/use-brace-expansion.md)
* Adopt brace expansion, share code for this with `require-computed-property-dependencies`
* [no-test-and-then](https://github.com/ember-cli/eslint-plugin-ember/blob/master/docs/rules/no-test-and-then.md)
* Convert to `await`
*
* Others?

This is a good "help wanted" / "first issue" for anyone who wants to help out and claim one or more of these.

Same issue for ember-template-lint: https://github.com/ember-template-lint/ember-template-lint/issues/2571

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.