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
build: minor fixes for google3 sync #18354
Conversation
5b65552
to
78e6cc5
Compare
@@ -102,7 +102,7 @@ export default function (options: Schema): Rule { | |||
try { | |||
const packageJsonContent = tree.read('/package.json'); | |||
if (packageJsonContent) { | |||
const packageJson = JSON.parse(packageJsonContent.toString('utf-8')); | |||
const packageJson = JSON.parse(packageJsonContent.toString('utf-8')) as {}; |
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.
This is for the linter? I'm surprised it runs at all on third party code.
We should add a comment here to explain that we need to cast the result for the linter. Also consider using unknown
as a safer alternative to {}
if not too much trouble.
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.
Sorry, to be exact, it is the compiler, not the linter. go/tsetse is built into the compiler, so the violations show up as hard errors at compile time.
I added the comments and typed it as never
instead of {}
. I'm surprised that bracket notation is allowed on never
type.
This commit makes a few minor changes to enable syncing the CLI repository into google3. 1. mark pkg_tar and pkg_npm as external 2. remove dependencies (marked as comment) which are stale in google3 3. remove TS files generated from JSON schema in BUILD files since these files are compiled and added to the g3 codebase at sync time 4. Some minor typing changes 5. Remove duplicate licenses 6. mark dependencies which are not available in g3 as external 7. Immediately type the result of JSON.parse() as required by g3 linter. Otherwise, the type defaults to `any`.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This commit makes a few minor changes to enable syncing the CLI repository
into google3.
since these files are compiled and added to the g3 codebase at sync time
Otherwise, the type defaults to
any
.