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

AskJsx resources are not commented at all #240

Open
czerwinskilukasz1 opened this issue Jun 26, 2020 · 4 comments
Open

AskJsx resources are not commented at all #240

czerwinskilukasz1 opened this issue Jun 26, 2020 · 4 comments
Labels
AskVM ./src/askvm/** documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@czerwinskilukasz1
Copy link
Collaborator

Except for an example written without any explanation in Query.tsx, there is no single .tsx file in src/askjsx/lib which would have any comment on the purpose of the resource and its usage.
Fragment, Fun, Let and Ref are the resources for which I think comments are the most urgent.

image

image

image

image

@czerwinskilukasz1 czerwinskilukasz1 added documentation Improvements or additions to documentation help wanted Extra attention is needed AskVM ./src/askvm/** labels Jun 26, 2020
@mhagmajer
Copy link
Collaborator

Let's start with having some comments in code and then we can add descriptions as a property of the resource function so we have something that an easy documentation can be generated from

@mhagmajer
Copy link
Collaborator

BTW, set is used here

export const Let = (props: Props) => <Set {...props} code="let" />;
export const Const = (props: Props) => <Set {...props} code="const" />;
export const Assign = (props: Props) => <Set {...props} code="assign" />;

https://github.com/xFAANG/askql/blob/master/src/askjsx/lib/Let.tsx#L35

@czerwinskilukasz1 seems like eslint has a bug... or perhaps it doesn't understand JSX?

@mhagmajer mhagmajer added the good first issue Good for newcomers label Jun 26, 2020
@czerwinskilukasz1
Copy link
Collaborator Author

BTW, set is used here

export const Let = (props: Props) => <Set {...props} code="let" />;
export const Const = (props: Props) => <Set {...props} code="const" />;
export const Assign = (props: Props) => <Set {...props} code="assign" />;

https://github.com/xFAANG/askql/blob/master/src/askjsx/lib/Let.tsx#L35

@czerwinskilukasz1 seems like eslint has a bug... or perhaps it doesn't understand JSX?

Probably. I was going to add // eslint-disable-next-line @typescript-eslint/no-unused-vars there and in one other places, so that we don't get eslint warnings.

@mhagmajer
Copy link
Collaborator

@czerwinskilukasz1 maybe we can file this issue with eslint and add a comment about it in Eslint repo? I'd rather not add comments in our code to hide a buggy behavior of Eslint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AskVM ./src/askvm/** documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants