Sha256: 0f1373a53371cc4f7fc238f56babdc6784620b6fd2b8d1fe09f15b98dabdcd35
Contents?: true
Size: 695 Bytes
Versions: 34
Compression:
Stored size: 695 Bytes
Contents
require 'pre-commit/checks/js' module PreCommit module Checks class Csslint < Js SOURCE = "https://github.com/stubbornella/csslint/blob/v0.10.0/release/csslint.js" def run_check(file) context = ExecJS.compile(File.read(linter_src)) context.call("CSSLint.verify", File.read(file))["messages"] end def linter_src File.expand_path("../../../../pre-commit/support/csslint/csslint.js", __FILE__) end def error_selector 'message' end def files_filter(staged_files) staged_files.grep(/\.css$/) end def self.description "Checks CSS files with CSSLint." end end end end
Version data entries
34 entries across 34 versions & 1 rubygems