-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[tslint] Fix violations in kbn-pm #19335
Conversation
💚 Build Succeeded |
packages/kbn-pm/src/cli.ts
Outdated
@@ -11,6 +11,7 @@ function help() { | |||
.map(commandName => commands[commandName]) | |||
.map(command => `${command.name} - ${command.description}`); | |||
|
|||
/* tslint:disable-next-line no-console */ | |||
console.log(dedent` |
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.
question: can't we just create log.ts
that exposes function with with console.log
signature and add this annotation only there or just keep tslint.yaml
with no-console: false
? Just don't want to embrace these /* tslint: something */
all over the place, I'd rather have this somewhere in a single place.
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.
❤️
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.
Yeah, I hope most people are averse to the tslint:disable
directives and will avoid console.log()
usage because of it, but I agree that having a suitable replacement is better than spreading the directives all over kbn-pm
💚 Build Succeeded |
* [tslint/kbn-pm] apply autofixes * [tslint/kbn-pm] whitelist all console.log calls for now * [tslint/kbn-pm] sort object keys alphabetically * [tslint/kbn-pm] use comments to "fill" empty blocks * [tslint/kbn-pm] use I-prefix for interface names * [tslint/kbn-pm] use arrow-functions where possible * [tslint/kbn-pm] use lowerCamelCase for variable names * [tslint/kbn-pm] prevent shadowed variable names * [tslint/kbn-pm] avoid variable name and type clashes * [tslint/kbn-pm] replace console.log statements with bare-bones logger
6.4/6.x: 09ba816 |
#19105 included overrides for several tslint rules that the existing TypeScript in kbn-pm violated, in order to keep the size of that PR smaller.
This PR removes those overrides, autofixes the violations where possible, and then manually fixes the remaining violations.
I suggest reviewing this PR commit-by-commit rather than all at once.