We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-readonly
I have the following code:
export type Writable<T> = { -readonly [K in keyof T]: T[K]; };
ESLint reports "functional/prefer-readonly-type" rule and an option to "--fix" it.
Autofix should remove -:
-
export type Writable<T> = { readonly [K in keyof T]: T[K]; };
Autofix creates a syntax error:
export type Writable<T> = { readonly -readonly [K in keyof T]: T[K]; };
ESLint config:
{ // ... plugins: [ // ... 'functional', // ... ], extends: [ // ... "plugin:functional/external-recommended", "plugin:functional/recommended", "plugin:functional/no-object-orientation", "plugin:functional/no-statements", "plugin:functional/no-exceptions", "plugin:functional/currying", "plugin:functional/stylistic", // ... ], // ... }
Either disable autofix for -readonly, or hande it properly.
See microsoft/TypeScript#21919
The text was updated successfully, but these errors were encountered:
I believe the correct behavior should be for it to not try and auto fix this at all.
Sorry, something went wrong.
functional/prefer-readonly-type
Successfully merging a pull request may close this issue.
Bug Report
I have the following code:
ESLint reports "functional/prefer-readonly-type" rule and an option to "--fix" it.
Expected behavior
Autofix should remove
-
:Actual behavior
Autofix creates a syntax error:
Steps to reproduce
ESLint config:
Proposed changes
Either disable autofix for
-readonly
, or hande it properly.See microsoft/TypeScript#21919
The text was updated successfully, but these errors were encountered: