ni / javascript-styleguide

JavaScript and TypeScript Style Guide
MIT License
9 stars 9 forks source link

Add recommended TypeScript rules part 1 #14

Closed mure closed 3 years ago

mure commented 3 years ago

This PR adds the set of recommended rules from the typescript-eslint package that do NOT require type checking. Pulled from here: https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/src/configs/recommended.ts

I removed the rules that conflicted with the ones we already had in the file. You can find the table of all rules here to understand their usage: https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules

mure commented 3 years ago

@TrevorKarjanis I made the config extend from plugin:@typescript-eslint/recommended and removed the hardcoded rules. The one side effect is that this PR will be a little harder to review now, because there's no rules to leave comments on. If we decide to make any overrides, I'll add them at the top of the config and put the comment back in.

TrevorKarjanis commented 3 years ago

@mure Hmm, I had not considered that for the purposes of evaluating the rules here, but I'm not in favor of including the rules directly just to satisfy that purpose. I agree if we have changes now we can add them to this review or open issues afterward. If desired, we can include a comment with the link to the configuration files on GitHub. Milan already requested a similar comment for the extension rules.

jattasNI commented 3 years ago

I added other reviewers as an FYI. I don't think we need everyone's approval in order to merge this since we discussed it in our meeting today.