Class: Pronto::Stylelint::Config
- Inherits:
-
Object
- Object
- Pronto::Stylelint::Config
- Defined in:
- lib/pronto/stylelint/config.rb
Constant Summary collapse
- EXECUTABLE_DEFAULT =
'stylelint'
- FILES_TO_LINT_DEFAULT =
/\.(c|sc|sa|le)ss$/.freeze
Instance Method Summary collapse
- #cli_options ⇒ Object
- #files_to_lint ⇒ Object
- #git_repo_path ⇒ Object
- #stylelint_executable ⇒ Object
Instance Method Details
#cli_options ⇒ Object
15 16 17 |
# File 'lib/pronto/stylelint/config.rb', line 15 def "#{stylelint_config['cli_options']} -f json".strip end |
#files_to_lint ⇒ Object
19 20 21 |
# File 'lib/pronto/stylelint/config.rb', line 19 def files_to_lint config_files_to_lint || FILES_TO_LINT_DEFAULT end |
#git_repo_path ⇒ Object
23 24 25 |
# File 'lib/pronto/stylelint/config.rb', line 23 def git_repo_path @git_repo_path ||= Rugged::Repository.discover(File.(Dir.pwd)).workdir end |
#stylelint_executable ⇒ Object
11 12 13 |
# File 'lib/pronto/stylelint/config.rb', line 11 def stylelint_executable stylelint_config['stylelint_executable'] || EXECUTABLE_DEFAULT end |