Skip to content
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

Disable static checkers on generated js files #752

Merged
merged 2 commits into from
Mar 19, 2020
Merged

Disable static checkers on generated js files #752

merged 2 commits into from
Mar 19, 2020

Conversation

IagoLast
Copy link
Contributor

This will work as a hotfix for #447

I think it could make sense to include it.
Since those are auto generated they never should be edited so it would be ok disable static checkers.

Eslint:
https://eslint.org/docs/2.13.1/user-guide/configuring#disabling-rules-with-inline-comments
Typescript
https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 15, 2020

CLA Check
The committers are authorized under a signed CLA.

Copy link
Collaborator

@stanley-cheung stanley-cheung left a comment

Choose a reason for hiding this comment

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

Thanks for the contributions!

@stanley-cheung stanley-cheung merged commit 87209cb into grpc:master Mar 19, 2020
@IagoLast
Copy link
Contributor Author

@stanley-cheung happy to help! this is a very nice project ❤️

Going deeper into the causes of this issue is because the code relies on googl to import/export modules. Any plans to a ES6 modules version on the roadmap?

@stanley-cheung
Copy link
Collaborator

No plan to support ES6 modules for now because protobuf doesn't support ES6 modules yet: https://github.com/protocolbuffers/protobuf/tree/master/js#protocol-buffers---googles-data-interchange-format

@abjennings
Copy link

I'm still getting 'proto' is not defined (and 'COMPILED') on the protobuf JS file.

Do you think the protocolbuffers/protobuf project would add these lines to the protobuf JS file?

@c10b10
Copy link

c10b10 commented Jul 14, 2020

I can confirm this has only been added to the --grpc-web_out generated file. Could it please be added to the --js_out file as well?

acozzette pushed a commit to protocolbuffers/protobuf that referenced this pull request Jul 27, 2020
I was getting TypeScript errors on the generated protobuf file.

These directives to turn off ESLint and TypeScript are just comments. They shouldn't affect anyone who is not using ESLint or TypeScript.

A similar change was made in the grpc/grpc-web project: grpc/grpc-web#752
vesavlad pushed a commit to vesavlad/protobuf that referenced this pull request Sep 22, 2020
I was getting TypeScript errors on the generated protobuf file.

These directives to turn off ESLint and TypeScript are just comments. They shouldn't affect anyone who is not using ESLint or TypeScript.

A similar change was made in the grpc/grpc-web project: grpc/grpc-web#752
acozzette pushed a commit to protocolbuffers/protobuf-javascript that referenced this pull request Apr 27, 2022
I was getting TypeScript errors on the generated protobuf file.

These directives to turn off ESLint and TypeScript are just comments. They shouldn't affect anyone who is not using ESLint or TypeScript.

A similar change was made in the grpc/grpc-web project: grpc/grpc-web#752
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants