-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
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
functional/prefer-immutable-types
Limit only to specific types
#577
Comments
Any update to this? Would this fix |
I haven't started work on this yet but will soon. This won't address that error you are getting. Could you give me the full type definition you are using. |
I get it in a bunch of places and am forced to disable enforcement altogether for now. export const slugify = (text: string) => text.replace(...) async function graphFetch(resource: `/${string}`) { readonly onClick?: (ev: React.MouseEvent<HTMLElement>) => void export const Switch = ({
isActiveByDefault,
onClick,
title,
}: {
readonly isActiveByDefault: boolean | undefined
readonly onClick: (isActive: boolean) => void
readonly title: string
}) => { export const Tag = ({ children }: { readonly children: string }) => { type Props = {
readonly style?: CSSProperties
readonly width: number
readonly height: number
readonly items: readonly Item[]
}
export const Bar = ({ style, width, height, items }: Props) => ( eslint config: {
"plugins": ["prettier", "simple-import-sort", "functional"],
"extends": [
"next/core-web-vitals",
"plugin:functional/lite",
"plugin:no-template-curly-in-string-fix/recommended",
"plugin:prettier/recommended"
],
"rules": {
"prettier/prettier": "error",
// minor non-related stylistic custom rules...
}
} |
🎉 This issue has been resolved in version 6.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Suggestion
Use the same approach as typescript-eslint/typescript-eslint#4436
Blocked until
@typescript-eslint/type-utils
v6 is released.The text was updated successfully, but these errors were encountered: