firstdraft / appdev_template

A Rails template for generating homework projects
0 stars 1 forks source link

Add .rubocop.yml to template #70

Closed jelaniwoods closed 4 years ago

jelaniwoods commented 5 years ago

69

Adds .rubocop.yml file for all generated Rails apps. Adds rubocop-rails and rubocop-perfomance gems.

I made changes to the following files that better adhere to Rubocop styles:

raghubetina commented 5 years ago

@jelaniwoods Hm. To make this easier to discuss, would you mind throwing up the vanilla version of .rubocop.yml somewhere, and then make a PR with your proposed changes for the AppDev version of .rubocop.yml, so we have a meaningful diff? It would actually be even better if we had a PR for each line that we're changing, so that the git blames and commit messages have good context for future teammates versions of ourselves.

I think that AppDev's version of .rubocop.yml is worthy of it's own repo. Perhaps we can adopt a convention: for each org (appdev-projects, firstdraft, etc), we can make a repo called style that contains our linters. In this case, appdev-projects/style/ruby/.rubocop.yml. What do you think?

jelaniwoods commented 5 years ago

@raghubetina by "vanila" .rubocop.yml do you mean like thoughtbot's file or like the default file from rubocop-hq

raghubetina commented 5 years ago

@jelaniwoods Hmm, good question. I sort of like the idea of starting from the vanilla vanilla one, rubocop-hq's, and developing our own opinionated version. However I don't know how much we've been coasting off of thoughtbot's until now, maybe they've already done a ton of work. It might be instructive to first look at a diff between rubocop-hq's and thoughtbot's?

jelaniwoods commented 5 years ago

@raghubetina Sure. I made a pull request between the rubocop-hq's and thoughtbot's configuration file here appdev-projects/style#1