-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionautofixThis change is related to ESLint's autofixing capabilitiesThis change is related to ESLint's autofixing capabilitiesenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintruleRelates to ESLint's core rulesRelates to ESLint's core rules
Description
What rule do you want to change?
no-array-constructor
What change do you want to make?
Implement autofix
How do you think the change should be implemented?
A new default behavior
Example code
/*eslint no-array-constructor: "error"*/
Array();
What does the rule currently do for this code?
Provides a suggestion to switch to []
.
What will the rule do after it's changed?
Switch to providing a full fix to switch to []
. This way it'll be automatically applied with --fix
& co.
Participation
- I am willing to submit a pull request to implement this change.
Additional comments
Coming over from typescript-eslint/typescript-eslint#11013: the core ESLint rule provides suggestions, while @typescript-eslint/no-array-constructor
provides a full --fix
fixer.
#17711 added the suggestions originally. I couldn't find any discussion on whether to use fix
or suggest
.
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionautofixThis change is related to ESLint's autofixing capabilitiesThis change is related to ESLint's autofixing capabilitiesenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintruleRelates to ESLint's core rulesRelates to ESLint's core rules
Type
Projects
Status
Complete