Skip to content
This repository has been archived by the owner. It is now read-only.

Less noise and more helpful rules #2

Merged
merged 5 commits into from Jan 13, 2020
Merged

Less noise and more helpful rules #2

merged 5 commits into from Jan 13, 2020

Conversation

@sstur
Copy link
Member

sstur commented Jan 12, 2020

The main purpose of this PR is to reduce the amount of red noise while coding. Most of this is stylistic rules that are not necessary since we're using Prettier. When we press save the editor will automatically fix this formatting anyway, so let's not yell at the user while they're typing.

If the developer doesn't have format-on-save enabled, this should be caught anyway during CI, since we run prettier --check as part of yarn test.

Other noisy rules fixed/removed:

  • remove no-empty-function
  • allow unused variables in rest destructuring

Added additional rules:

  • dot-notation (prefer a.b over a['b'])
  • ban-types (use a: string and not a: String)
@sstur sstur requested review from darcien and oshimayoan Jan 12, 2020
@sstur sstur changed the title Remove rules that will overlap with Prettier and TS Less noise and more helpful rules Jan 12, 2020
@darcien

This comment has been minimized.

Copy link
Contributor

darcien commented Jan 13, 2020

Looks good to me.

Code style rule mostly ported from MW and over there we have comments that says:

    // The following rules are not necessary when using Prettier, but we're
    // including them so automated tests can catch if Prettier is turned off.

So I guess we no longer need them

@darcien darcien added approved and removed ready for review labels Jan 13, 2020
@darcien darcien merged commit 59c837b into master Jan 13, 2020
@darcien darcien deleted the styleLoose branch Jan 13, 2020
@sstur

This comment has been minimized.

Copy link
Member Author

sstur commented Jan 13, 2020

Looks good to me.

Code style rule mostly ported from MW and over there we have comments that says:

    // The following rules are not necessary when using Prettier, but we're
    // including them so automated tests can catch if Prettier is turned off.

So I guess we no longer need them

Ahh yes. I guess I wrote that comment, that makes sense now! (I realize comments are for future self as much as they are for other people haha)

That was before we run prettier --check on CI.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants
You can’t perform that action at this time.