Roman Kapustynskyi
04/07/2023, 5:37 PMgem "rubocop", "~> 1.0"
gem "rubocop-performance", "~> 1.5"
gem "rubocop-rails", "~> 2.3"
gem "rubocop-rspec", "~> 2.0"
Enabling rubocop-rails and rubocop-rspec in the config produced even more offenses.
But since the dependencies are added, I assume that I need to import a rubocop config from somewhere to follow your code style?kennyadsl
Roman Kapustynskyi
04/12/2023, 11:56 AMstandard
gem instead of maintaining the rubocop rules, but it was decided not to make that change now to avoid touching a lot of files just for formatting. Can't find it anymore unfortunately.
As of now there are a lot of violations in the specs, because they contain a lot of context nesting, and more than 1 expectation in examples, which violates rubocop-rspec
rules. And a bunch more not inside specs.
I personally think that it would be better to not add these gems into Gemfile if they are not used in solidus_starter_frontend
repo. And to copy some rubocop configuration file when installing solidus_starter_frontend
template (because that almost always mean that it is a new project without custom configuration) to project root, that has the same rules used in solidus_starter_frontend
, so rubocop command will not have failures after installation. And I think that would better be done from someone who has knowledge with solidus_starter_frontend
and installer script.
When it would be decided how to correctly implement code styling I can help with rewriting the existing code for new rules.kennyadsl
kennyadsl
Roman Kapustynskyi
04/12/2023, 12:34 PMsolidus_starter_frontend
repo with some set of rules, they should be copied into project during installation, so people then could decide whether to continue using them or make changes based on their preference.
Because as of now, there are no docs on code styling, and these gems are added to the Gemfile, but are not used in solidus_starter_frontend
repo, so it's a bit confusing why they are added there. Initially I thought that I would need to search for some set of rules, but as I see in the repo itself rubocop-rspec
and rubocop-rails
are not used. I think it would be better to remove them during installation step and copy solidus_starter_frontend
rubocop set of rules into project, because as I see there are some, at least on line size, so they would pass on initial installation.
Maybe some mention in the README about code style would be helpful too.kennyadsl