rubocop-discourse-base
Shared RuboCop configuration used across Discourse projects. It ships the common core cops we enable, layout preferences, and an optional rspec profile.
Installation
Add the gem to your development group:
group :development, :test do
gem "rubocop-discourse-base"
endConfiguration
Base config (core + layout) for non-Syntax Tree users:
inherit_gem:
rubocop-discourse-base: default.ymldefault.yml is kept for backwards compatibility and includes our layout cops. It inherits stree-compat.yml (core cops only) plus rubocop-layout.yml.
Syntax Tree–friendly config (omits Layout cops so it can be used with the formatter):
inherit_gem:
rubocop-discourse-base: stree-compat.ymlMinimal core-only config (same cops as stree-compat.yml):
inherit_gem:
rubocop-discourse-base: rubocop-core.ymlRSpec support (requires gem "rubocop-rspec"); use with either default.yml or stree-compat.yml:
inherit_gem:
rubocop-discourse-base:
- default.yml # or stree-compat.yml
- rubocop-rspec.ymlThen run bundle exec rubocop as usual.