apptension / react-boilerplate

A production ready boilerplate used in Apptension for all web React projects
MIT License
37 stars 7 forks source link

Drop semicolons on the end of the line #25

Closed cpBurn closed 5 years ago

cpBurn commented 6 years ago

I don't have a strong technical reason to remove semicolons and many can argue that it doesn't improve readability, but personally I think it does improve

import { Header } from '../components/header.component'; 
import { AComponent } from '../components/aComponent.component'; 
import { BComponent } from '../components/bComponent.component'; 

export const A_CONST = 'a_const';
export const B_CONST = 'b_const';
export const C_CONST = 'c_const';

---

render() {
    return <div ref={(ref) => { this.div = ref;  }} />;
}
import { Header } from '../components/header.component'
import { AComponent } from '../components/aComponent.component'
import { BComponent } from '../components/bComponent.component'

export const A_CONST = 'a_const'
export const B_CONST = 'b_const'
export const C_CONST = 'c_const'

---

render() {
    return <div ref={(ref) => { this.div = ref }} />
}

image

I know it's a trend in JS and it's more aesthetic than anything else, but it feels cleaner looking a whole file without semicolons and as we tend to move more and more things to be handled in JS, makes sense to code with a more visually cleaner environment.

Good opinion about it: https://www.youtube.com/watch?v=Qlr-FGbhKaI

@pziemkowski @mikeqcp @mkleszcz @wojciech-panek What you guys think?

pziemkowski commented 6 years ago

The only opinion I have about this is that we are all so used to writing semicolons that changing this would disturb status quo :D

It's a lot of "kur**" for two weeks of everyone not remembering to no longer write them :P

cpBurn commented 6 years ago

The only opinion I have about this is that we are all so used to writing semicolons that changing this would disturb status quo :D

That's the thing! We're forced to used semicolons due to eslint rules (that's why this exists in the first place, so we don't forget it)

Would it a ludicrous idea to leave semicolons optional, or as a decision for the tech leader in the beginning of the project?

wojciech-panek commented 6 years ago

It's easier to switch between projects when we all fallow the same rules

pziemkowski commented 6 years ago

Least possible differences between projects. That's the rule we have to follow.

That's the whole idea behind common boilerplate and eslint rules. Anyway Daniel. This issue is on a wrong repository. Eslint rules are somewhere else