Class: RuboCop::GraphQL::Plugin
- Inherits:
-
LintRoller::Plugin
- Object
- LintRoller::Plugin
- RuboCop::GraphQL::Plugin
- Defined in:
- lib/rubocop/graphql/plugin.rb
Overview
A plugin that integrates rubocop-graphql with RuboCop’s plugin system.
Instance Method Summary collapse
Instance Method Details
#about ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/rubocop/graphql/plugin.rb', line 9 def about LintRoller::About.new( name: "rubocop-graphql", version: VERSION, homepage: "https://github.com/DmitryTsepelev/rubocop-graphql", description: "RuboCop extension for enforcing graphql-ruby best practices." ) end |
#rules(_context) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/rubocop/graphql/plugin.rb', line 22 def rules(_context) LintRoller::Rules.new( type: :path, config_format: :rubocop, value: Pathname.new(__dir__).join("../../../config/default.yml") ) end |
#supported?(context) ⇒ Boolean
18 19 20 |
# File 'lib/rubocop/graphql/plugin.rb', line 18 def supported?(context) context.engine == :rubocop end |