Move files from lib/haml_lint to haml_lint

Files in lib will be eager loaded and hence will require haml_lint to be
loaded. Since this is only a development dependency, we can't assume
this gem will be available in production, so it should never be loaded
in production.
This commit is contained in:
Stan Hu 2019-05-21 19:49:14 -07:00
parent 0ded86570c
commit 27381e22a9
5 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@ exclude:
- 'vendor/**/*'
- 'spec/**/*'
require:
- './lib/haml_lint/linter/no_plain_nodes.rb'
- './haml_lint/linter/no_plain_nodes.rb'
linters:
AltText:

View File

@ -1,6 +1,6 @@
unless Rails.env.production?
require 'haml_lint/rake_task'
require 'haml_lint/inline_javascript'
require Rails.root.join('haml_lint/inline_javascript')
# Workaround for warnings from parser/current
# Keep it even if it no longer emits any warnings,

View File

@ -3,6 +3,7 @@
require 'spec_helper'
require 'haml_lint'
require 'haml_lint/spec'
require Rails.root.join('haml_lint/linter/no_plain_nodes')
describe HamlLint::Linter::NoPlainNodes do
include_context 'linter'