Closed
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
context.report({
fix(fixer) {
const fixes = [...] as const;
return fixes;
}
});
Expected Result
No errors :).
Additional Info
A readonly []
is already accepted for suggestions
. Probably doing this change would be sufficient (I can take this if accepted):
typescript-eslint/packages/experimental-utils/src/ts-eslint/Rule.ts
Lines 115 to 117 in 0bb878b
type ReportFixFunction = (
fixer: RuleFixer,
- ) => null | RuleFix | RuleFix[] | IterableIterator<RuleFix>;
+ ) => null | RuleFix | readonly RuleFix[] | IterableIterator<RuleFix>;
Versions
package | version |
---|---|
@typescript-eslint/experimental-utils |
4.29.3 |
TypeScript |
4.4.2 |
node |
12.22.5 |