Update code standards so that they follow our prettier config #354
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked, waiting for further changes
bug
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
help wanted
invalid
low priority
needs input
needs review
project documentation
question
research
reviewed
script
security
SQL
style
testing
topLevel
wontfix
No milestone
No project
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K#354
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Prettier config sits in frontend under (.prettierrc). Its easier to change our code standards than update everyone's config!
Wiki: https://git.webug.se/Andras/BoundlessFlowCampus2K/wiki/Coding-Conventions
To better match the current Code convention, the following formatting rules could be added:
Make sure to use single quotes ( ' ) for strings.
Make sure to always end statements with semicolons.
-Keep the maximum line length to 80 characters.
-Add commas where it is allowed (for example in objects and arrays). This makes it easier to add new elements later. Example:
const colors = [
'black',
'red',
'blue',
];
-Arrow functions should include parentheses, for example:
var double = (x) => x * 2;
-Keep spacing inside brackets, for example:
{ value } instead of {value}.
The research is good it matches our current prettier setup. However since this issue is to make sure our standards align with our .prettierrc i believe we should include all the rules stated in our .prettierrc rather just a part of it.
At the same time we need to be careful about how and where we add these rules into the wiki since in our current project prettier does not support all the languages that are currently in use specifically C# and SQL because of this when adding these rules to the general coding conventions sections we need to be careful because prettier does technically not apply to every language.
Rules: