Skip to content

Conversation

@BendingBender
Copy link
Collaborator

No description provided.


const diagnosticFileName = (diagnostic.file as SourceFile).fileName;
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const diagnosticFileName = diagnostic.file!.fileName;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we guard diagnostic.file? Or is its optionality incorrect?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem to have caused any problems yet. I don't really know whether it may actually be undefined.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's not really related to this PR. Just thought I'd bring it up. We should be careful about ! in general unless we are 100% sure it cannot be undefined or null.

@sindresorhus sindresorhus changed the title Replace tslint with eslint Replace TSLint with ESLint Jun 4, 2021
@sindresorhus sindresorhus merged commit 28195d6 into tsdjs:main Jun 4, 2021
@BendingBender BendingBender deleted the move-to-eslint branch June 4, 2021 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants