Class: Pronto::Stylelint
- Inherits:
-
Runner
- Object
- Runner
- Pronto::Stylelint
- Extended by:
- Forwardable
- Defined in:
- lib/pronto/stylelint.rb,
lib/pronto/stylelint/config.rb,
lib/pronto/stylelint/linter.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#stylelint_config ⇒ Object
readonly
Returns the value of attribute stylelint_config.
Instance Method Summary collapse
-
#initialize(patches, commit = nil) ⇒ Stylelint
constructor
A new instance of Stylelint.
- #run ⇒ Object
Constructor Details
Instance Attribute Details
#stylelint_config ⇒ Object (readonly)
Returns the value of attribute stylelint_config.
13 14 15 |
# File 'lib/pronto/stylelint.rb', line 13 def stylelint_config @stylelint_config end |
Instance Method Details
#run ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/pronto/stylelint.rb', line 27 def run return [] if !@patches || @patches.count.zero? @patches .select { |patch| patch.additions.positive? && style_file?(patch.new_file_full_path) } .flat_map { |patch| inspect(patch) } .compact end |