Class: RuboCop::Slim::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- RuboCop::Slim::Plugin
- Defined in:
- lib/rubocop/slim/plugin.rb
Instance Method Summary collapse
Instance Method Details
#about ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/rubocop/slim/plugin.rb', line 8 def about ::LintRoller::About.new( description: 'RuboCop plugin for Slim template.', homepage: 'https://github.com/r7kamura/rubocop-slim', name: 'rubocop-slim', version: VERSION ) end |
#rules(_context) ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/rubocop/slim/plugin.rb', line 17 def rules(_context) ::RuboCop::Runner.ruby_extractors.unshift(::RuboCop::Slim::RubyExtractor) ::LintRoller::Rules.new( config_format: :rubocop, type: :path, value: "#{__dir__}/../../../config/default.yml" ) end |
#supported?(context) ⇒ Boolean
27 28 29 |
# File 'lib/rubocop/slim/plugin.rb', line 27 def supported?(context) context.engine == :rubocop end |