eslint-plugin-functional
eslint-plugin-functional copied to clipboard
Autofix for `functional/prefer-readonly-type` produces confusing formatting
Bug Report
Autofix for functional/prefer-readonly-type on a mapped type like the following inserts readonly on a wrong line:
let a: {
[B in 'c']: 'd';
};
Expected behavior
let a: {
readonly [B in 'c']: 'd';
};
Actual behavior
let a: { readonly
[B in 'c']: 'd';
};
Proposed changes
Put readonly on the correct line.
Additional information
Related to #384
I'm not sure why this would be happening. I can look into it but formatting isn't the goal of this plugin; another rule or tool should be used to manage/fix formatting.