uncharted-aske / HMI

Apache License 2.0
1 stars 0 forks source link

Refactor all types to export on same line #440

Open mj3cheun opened 3 years ago

mj3cheun commented 3 years ago

@RosaRomeroGomez and @YohannParis, opinions on export on same line vs at bottom? i personally prefer same line but we should probably make it consistent either way.

YohannParis commented 3 years ago

I personally like it at the bottom so that is easier to set them up, rename them etc. Because not all functions or constants in a file will be exported.

But in the end, I agree that being consistent is more important. So I'll say go with what's easier/fastest for you.

i.e.

// All the functions
[...]

// Exports
export { 
  myFunction as default, // export feature declared earlier as default
  myFunction as function1, // rename exports to avoid naming conflicts
};