OU-1389: Style Guide#1089
Conversation
|
|
||
| Others for consideration: | ||
|
|
||
| - Barrel Files |
There was a problem hiding this comment.
I am personally not a fan of barrel files as they add a layer of indirection and don't add any functional change to the codebase. I would prefer either using alias's or just having the full path
There was a problem hiding this comment.
fair enough, I think they are also more useful for libraries rather than a consumer app
| - Barrel Files | ||
| - export all things at bottom of file (easy to find what each file exports) | ||
| - Require commit signing | ||
| - Require conventional commits https://www.conventionalcommits.org/en/v1.0.0/ |
| Others for consideration: | ||
|
|
||
| - Barrel Files | ||
| - export all things at bottom of file (easy to find what each file exports) |
There was a problem hiding this comment.
I don't have a strong opinion about it, but I think IDEs can resolve where the export is so it might be just an overhead
There was a problem hiding this comment.
Fair enough, I had just seen the pattern online and thought it was interesting to consider
|
|
||
| ### 6. `react/self-closing-comp` | ||
|
|
||
| Always self close tags have no children |
There was a problem hiding this comment.
| ### 6. `react/self-closing-comp` | |
| Always self close tags have no children | |
| ### 6. `react/self-closing-comp` | |
| Always self close tags have no children | |
| ### 7. co-locate test files | |
| test files must have the `.spec.ts` suffix and be co-located with the file they are testing |
There was a problem hiding this comment.
Agree, maybe we should note this as being for unit and component tests
As I work through the dynamic test running and discuss more with @etmurasaki we can define the e2e tests placement later (maybe /cypress/features/x or /src/features/x/tests)
| Always self close tags have no children | ||
|
|
||
| Others for consideration: | ||
|
|
There was a problem hiding this comment.
separate visualization from data, using hooks or wrapper components around visualization components
| Always self close tags have no children | ||
|
|
||
| Others for consideration: | ||
|
|
There was a problem hiding this comment.
When using Patternfly components consider creating "wrapper" components that our codebase will use which enable easier backporting by maintaining stable UI structure across versions
/hold
Point of discussion for a potential style guide. All items should be enforced by lint rules where possible