-
-
Notifications
You must be signed in to change notification settings - Fork 33
Closed as not planned
Closed as not planned
Copy link
Labels
Resolution: Won't FixA real bug or issue, but the issue is not impactful enough to spend time on.A real bug or issue, but the issue is not impactful enough to spend time on.
Description
Bug Report
eslint config:
'functional/type-declaration-immutability': [
'error',
{
rules: [
{
identifiers: '^(?!I?Mutable).+',
immutability: 'ReadonlyShallow',
comparator: 'AtLeast',
fixer: false,
},
],
ignoreInterfaces: true,
},
],
Given the above config, I'm basically wanting anything to be at least ReadonlyShallow except for interfaces, which works great. However, given this example
interface A {
prop: string;
}
interface B {
prop2: string;
}
type UnionedType = A | B;
I'm getting the following error
This type is declare to have an immutability of at least "ReadonlyShallow" (actual: "Mutable")
I don't think that my config is off. It seems to me like this is more of a cornercase for this new rule.
Expected behavior
Union type of > 1 interfaces doesn't error out if ignoreInterfaces is true
Actual behavior
Union type of > 1 interfaces errors out if ignoreInterfaces is true
Steps to reproduce
Add above config and use above example
Proposed changes
Metadata
Metadata
Assignees
Labels
Resolution: Won't FixA real bug or issue, but the issue is not impactful enough to spend time on.A real bug or issue, but the issue is not impactful enough to spend time on.