-
Notifications
You must be signed in to change notification settings - Fork 257
chore(NODE-4376): add typescript to eslint rules #505
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
Conversation
0c5fa90
to
5e70517
Compare
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.
requesting changes for visibility
"typedoc": "^0.21.2", | ||
"typescript": "^4.0.2", | ||
"tsd": "^0.21.0", | ||
"typescript": "^4.7.4", |
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.
typedoc is intentionally removed here ✅
@@ -31,22 +30,23 @@ | |||
"@babel/plugin-external-helpers": "^7.10.4", | |||
"@babel/preset-env": "^7.11.0", | |||
"@istanbuljs/nyc-config-typescript": "^1.0.1", | |||
"@microsoft/api-extractor": "^7.11.2", | |||
"@microsoft/api-extractor": "^7.28.0", |
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.
confirmed that no new prod dependencies are added ✅
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.
If we actually want to keep all these rules as best practices, can we provide context for the cases where we explicitly disable them as to why it's ok to disable them in that particular case? Otherwise if the instances are out of scope to fix, I would at least tag all those lines with a follow up node ticket
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.
Don’t have much to comment on the added eslint-disable-next-line lines, they don’t seem to have obvious alternatives in the places where they are used afaict.
src/code.ts
Outdated
@@ -52,7 +52,7 @@ export class Code { | |||
|
|||
inspect(): string { | |||
const codeJson = this.toJSON(); | |||
return `new Code("${codeJson.code}"${ | |||
return `new Code("${codeJson.code.toString()}"${ |
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.
Do you want to do
return `new Code("${codeJson.code.toString()}"${ | |
return `new Code("${String(codeJson.code)}"${ |
here as well, since there is no argument validation in the constructor and this handles null/undefined as well?
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.
Good call!
Description
What is changing?
NODE-4376
mongodb/node-mongodb-native#3304
Also updates a number of dependencies.
Is there new documentation needed for these changes?
What is the motivation for this change?
Driver tooling sync
Double check the following
npm run lint
script<type>(NODE-xxxx)<!>: <description>