-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore: enable no-unsafe-assignment internally #3280
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
Changes from all commits
9b9369e
a342e56
734e061
1efce1b
1f1e18b
14129ad
62f58ea
e5496f7
4ba6090
705b20f
deb9ea6
3ec50ce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ export { | |
} from '@typescript-eslint/typescript-estree'; | ||
|
||
// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment | ||
export const version: string = require('../package.json').version; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. perhaps we should add a global type declaration to the project. declare module '../package.json' {
export const version = string;
} would that fix this problem? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think so 😕 , in interface Require {
(id: string): any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could probably just improve the internal types here?
https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/experimental-utils/typings/eslint-utils.d.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went down a bit of a rabbit hole on this one... In theory we could turn them into their own
unique symbol
s, and usetypeof ...
for the types here.Unfortunately that then means that the
eslint-utils/ReferenceTracker.d.ts
output file now has an import fromeslint-utils
, which causes compile complaints:At that point I gave up.