Standardize code "style" across packages
See original GitHub issueWe are using a variety of code styles (var naming, function declaration, modularization) across our packages. We should take stock of the different styles and as a team choose a general code style and update our packages to match.
This will be three phases:
- Go through code (ts/tsx files in particular) and take not of the different styles we use
- variable naming conventions (eg camelCase vs underscore)
- how we declare functions (
functionName() {}
vsfunctionName = () => {}
) - how we break up and spread out code across files in a package
- Meet as a team and decide which methodology we want to use for each styling
- Go through the code and update to match the chosen styling.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Code style options and code cleanup - Visual Studio (Windows)
First, configure which code styles you want to apply (in one of two profiles) in the Configure Code Cleanup dialog box. To open...
Read more >Code Style and Formatting - The Turing Way
A coding style is a set of conventions on how to format code. For instance, what do you call your variables? Do you...
Read more >Tools for Consistent JavaScript Code Style - Bits and Pieces
Reusing code, in and across repositories, is essential for standardized and clear code. Exploring shared React components in Bit.dev. Prettier.
Read more >Standardizing the code style in a Node.js project - Headsigned
Having a common style is valuable both to the project and the team. ESLint, Prettier and EditorConfig make this process fully automatic.
Read more >How to configure and enforce coding standard rules - Devbridge
EditorConfig is a code styling configuration that gets rid of simple mistakes such as different indentation type usages.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Once #296 is merged we can start work on this
Update from my inital work and discussion in scrum today:
static myfunctionName(): void { }
will make a function can be called asUtilClass. myfunctionName()
by importing the containingUtilClass
myfunctionName(): void { }
which can be called within a class withthis.myfunctionName()
private myfunctionName = (): void => { }
which can be called locally asmyfunctionName()
All of these are valid and have their use cases despite looking different, as such we will allow them to all be used.