Skip to content

Commit

Permalink
Merge 8181a98 into 99d323a
Browse files Browse the repository at this point in the history
  • Loading branch information
abannura committed Dec 31, 2018
2 parents 99d323a + 8181a98 commit 2634bc0
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 19 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -37,9 +37,9 @@ tslint:
ruby:
enabled: true
config_file: style/config/.rubocop.yml
scss:
stylelint:
enabled: true
config_file: style/config/.scss-lint.yml
config_file: style/config/.stylelintrc.json
```

And running...
Expand All @@ -53,7 +53,7 @@ You will get in your `$HOME` path the following files:
```
.eslintrc.json
.rubocop.yml
.scss-lint.yml
.stylelintrc.json
```

Also, you can pass a linter's name to update rules for specific languages.
Expand Down
2 changes: 1 addition & 1 deletion lib/hound.rb
Expand Up @@ -13,7 +13,7 @@
require "hound/config/ruby"
require "hound/config/eslint"
require "hound/config/tslint"
require "hound/config/scss"
require "hound/config/stylelint"

module Hound
end
4 changes: 2 additions & 2 deletions lib/hound/config/scss.rb → lib/hound/config/stylelint.rb
@@ -1,8 +1,8 @@
module Hound
module Config
class Scss < Base
class Stylelint < Base
def initialize
@linters_file_name = ".scss-lint.yml"
@linters_file_name = ".stylelintrc.json"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/hound/config_collection.rb
Expand Up @@ -2,7 +2,7 @@ module Hound
module ConfigCollection
extend self

LINTER_NAMES = %w{ruby eslint tslint scss}
LINTER_NAMES = %w{ruby eslint tslint stylelint}

def config_instances(linter_names = [])
linter_names = LINTER_NAMES if linter_names.empty?
Expand Down
1 change: 1 addition & 0 deletions lib/hound/rules_updater.rb
Expand Up @@ -30,6 +30,7 @@ def write_rules(linter_configs, local)
end

def get_rules(linter_config, local)
puts linter_config.name
if !HoundConfig.enabled_for?(linter_config.name)
inform_disabled(linter_config)
return
Expand Down
2 changes: 1 addition & 1 deletion spec/hound_config_spec.rb
Expand Up @@ -11,7 +11,7 @@ def stub_config_source(config_file_name)

it "returns the content of the remote config file" do
expect(HoundConfig.content).to eq(
"scss" => { "enabled" => false },
"stylelint" => { "enabled" => true },
"ruby" => { "config_file" => ".ruby-style.yml" },
"javascript" => { "ignore_file" => ".javascript_ignore" }
)
Expand Down
4 changes: 2 additions & 2 deletions spec/support/assets/config/.hound.enabled.yml
@@ -1,5 +1,5 @@
scss:
enabled: false
stylelint:
enabled: true

ruby:
enabled: true
Expand Down
4 changes: 2 additions & 2 deletions spec/support/assets/config/.hound.remote.yml
@@ -1,5 +1,5 @@
scss:
enabled: false
stylelint:
enabled: true

ruby:
config_file: .ruby-style.yml
Expand Down
7 changes: 0 additions & 7 deletions spec/support/assets/rules/.scss-lint.yml

This file was deleted.

7 changes: 7 additions & 0 deletions spec/support/assets/rules/.stylelintrc.json
@@ -0,0 +1,7 @@
{
"rules": {
"rule1": true,
"ruel2": false,
"ruel3": false
}
}

0 comments on commit 2634bc0

Please sign in to comment.