Skip to content
This repository was archived by the owner on Mar 25, 2021. It is now read-only.

Relax "no-null-undefined-union" rule.#4625

Merged
adidahiya merged 7 commits intopalantir:masterfrom
nrathi:neha
Apr 4, 2019
Merged

Relax "no-null-undefined-union" rule.#4625
adidahiya merged 7 commits intopalantir:masterfrom
nrathi:neha

Conversation

@nrathi
Copy link
Copy Markdown
Contributor

@nrathi nrathi commented Apr 2, 2019

PR checklist

CHANGELOG.md entry:

[rule-change] Relax no-null-undefined-union rule.

@VincentLanglet
Copy link
Copy Markdown
Contributor

VincentLanglet commented Apr 2, 2019

Hi @nrathi

Can you add a test for

type Text = string | null

interface Props {
  title?: Text
}
interface SuperProps {
  title?: Text | number
}

function someFunc(bar?: Text, foo?: Text | number) {}

I don't expect error from the rule, if you do, there should be at least an option to disable these cases.

@nrathi
Copy link
Copy Markdown
Contributor Author

nrathi commented Apr 2, 2019

@VincentLanglet added, no errors!

Comment thread test/rules/no-null-undefined-union/test.ts.lint Outdated
Neha Rathi added 2 commits April 4, 2019 15:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants