# typed: strict # frozen_string_literal: true require 'rubocop/packs/private' module RuboCop module Packs extend T::Sig PROJECT_ROOT = T.let(Pathname.new(__dir__).parent.parent.expand_path.freeze, Pathname) CONFIG_DEFAULT = T.let(PROJECT_ROOT.join('config', 'default.yml').freeze, Pathname) private_constant(:CONFIG_DEFAULT, :PROJECT_ROOT) sig { void } def self.bust_cache! config.bust_cache! Private.bust_cache! end sig { params(blk: T.proc.params(arg0: Private::Configuration).void).void } def self.configure(&blk) yield(config) end sig { returns(Private::Configuration) } def self.config Private.load_client_configuration @config = T.let(@config, T.nilable(Private::Configuration)) @config ||= Private::Configuration.new end end end