Class: Pronto::Stylelint::Config

Inherits:
Object
  • Object
show all
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

Instance Method Details

#cli_optionsObject



15
16
17
# File 'lib/pronto/stylelint/config.rb', line 15

def cli_options
  "#{stylelint_config['cli_options']} -f json".strip
end

#files_to_lintObject



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_pathObject



23
24
25
# File 'lib/pronto/stylelint/config.rb', line 23

def git_repo_path
  @git_repo_path ||= Rugged::Repository.discover(File.expand_path(Dir.pwd)).workdir
end

#stylelint_executableObject



11
12
13
# File 'lib/pronto/stylelint/config.rb', line 11

def stylelint_executable
  stylelint_config['stylelint_executable'] || EXECUTABLE_DEFAULT
end