diff --git a/.haml-lint.yml b/.haml-lint.yml new file mode 100644 index 000000000..bf61f7f60 --- /dev/null +++ b/.haml-lint.yml @@ -0,0 +1,5 @@ +linters: + LineLength: + max: 120 + SpaceInsideHashAttributes: + style: no_space diff --git a/Gemfile b/Gemfile index 35054b83b..6b7a1d1c4 100644 --- a/Gemfile +++ b/Gemfile @@ -236,9 +236,11 @@ group :development do # Linters gem "jshintrb", "0.3.0" gem "rubocop", "0.32.1" + gem "haml_lint", "0.13.0" gem "pronto", "0.4.2" gem "pronto-jshint", "0.4.2" gem "pronto-rubocop", "0.4.4" + gem "pronto-haml", "0.4.3" # Preloading environment diff --git a/Gemfile.lock b/Gemfile.lock index e1c94a820..b45a0acc4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -347,6 +347,10 @@ GEM rubocop (~> 0.20) haml (4.0.6) tilt + haml_lint (0.13.0) + haml (~> 4.0) + rubocop (>= 0.25.0) + sysexits (~> 1.1) handlebars_assets (0.20.2) execjs (~> 2.0) multi_json (~> 1.0) @@ -492,6 +496,9 @@ GEM octokit (~> 3.8.0) rugged (~> 0.22.0) thor (~> 0.19.0) + pronto-haml (0.4.3) + haml_lint (~> 0.13.0) + pronto (~> 0.4.0) pronto-jshint (0.4.2) jshintrb (~> 0.3.0) pronto (~> 0.4.0) @@ -720,6 +727,7 @@ GEM activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) state_machine (1.2.0) + sysexits (1.2.0) systemu (2.6.5) terminal-table (1.5.2) test_after_commit (0.4.1) @@ -811,6 +819,7 @@ DEPENDENCIES guard-rspec (= 4.6.3) guard-rubocop (= 1.2.0) haml (= 4.0.6) + haml_lint (= 0.13.0) handlebars_assets (= 0.20.2) http_accept_language (= 2.0.5) i18n-inflector-rails (= 1.0.7) @@ -839,6 +848,7 @@ DEPENDENCIES open_graph_reader (= 0.6.1) pg (= 0.18.2) pronto (= 0.4.2) + pronto-haml (= 0.4.3) pronto-jshint (= 0.4.2) pronto-rubocop (= 0.4.4) pry diff --git a/bin/haml-lint b/bin/haml-lint new file mode 100755 index 000000000..db990c177 --- /dev/null +++ b/bin/haml-lint @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby +# +# This file was generated by Bundler. +# +# The application 'haml-lint' is installed as part of a gem, and +# this file is here to facilitate running it. +# + +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile", + Pathname.new(__FILE__).realpath) + +require 'rubygems' +require 'bundler/setup' + +load Gem.bin_path('haml_lint', 'haml-lint')