A GraphQL-powered, NextJs-based, PWA storefront for Saleor. IMPORTANT: This project is [DEPRECATED] in favor of saleor/react-storefront soon to become our default demo and storefront starter pack.
Right now it is almost impossible to know what some functions do due to shortcutting identifiers. Especially shortcutting definitions like the code example below:
This is terrible to read and very hard for new developers to understand what this function does. The utility function is not descriptive nor do the parameters describe what they stand for.
The function is descriptive and also the parameters are a lot more readable.
Alternative
An alternative would be to add JSDoc to the codebase that will help describe what functions and classes do. For now it seems redundant due to the amount of typescript already covering most of what JSDoc does.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
What I'm trying to achieve
Right now it is almost impossible to know what some functions do due to shortcutting identifiers. Especially shortcutting definitions like the code example below:
This is terrible to read and very hard for new developers to understand what this function does. The utility function is not descriptive nor do the parameters describe what they stand for.
Describe a proposed solution
I would like to add a rule to the eslint called
id-length
https://eslint.org/docs/rules/id-lengthThe end result of this function would be
The function is descriptive and also the parameters are a lot more readable.
Alternative
An alternative would be to add JSDoc to the codebase that will help describe what functions and classes do. For now it seems redundant due to the amount of typescript already covering most of what JSDoc does.