pronto-stylelint 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b7000369e44f8bc34585cea9054ce56d2746d5a
4
- data.tar.gz: 0d8fe296f200987b86227aad86d8df676b46f5ac
3
+ metadata.gz: aea303d474a96584edd210b686f2717eaf7aa492
4
+ data.tar.gz: 9ec8722396e4e3ef3797f098a9d656ede07f8194
5
5
  SHA512:
6
- metadata.gz: c17a004c2e693d6b79d0686d8654d53f493594a580ce7a72b3361e82cf834376fdf87658e18cdd6c1d63abd824b9e254885ef4ee66a96a544c20bb6d32b16cfb
7
- data.tar.gz: 21a22658f1f6075282e35ba1cc7a0619a398434997e1bdf56c9cab24617c4156648c4ce97b642aa28d2566563a31a289388405084a311239973272cc4dba7b09
6
+ metadata.gz: ddf222252eafad7cbf813017ecb303a323f3081a5525471bbc9148131feb0eabbd86039d404bd0f321f6f8e5a5a76b0a8ce9a86ef95a4784f44ef44ee42dfece
7
+ data.tar.gz: 7d86f14034d287a33c8d037398be69e6b97ba958893eab051a1cf615f09cd40d66ea22c96ed073639a8638ea93daf19d5937083cdcbad6a1acf140fb96aa5393
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![Test Coverage](https://codeclimate.com/github/kevinjalbert/pronto-stylelint/badges/coverage.svg)](https://codeclimate.com/github/kevinjalbert/pronto-stylelint/coverage)
7
7
  [![Dependency Status](https://gemnasium.com/badges/github.com/kevinjalbert/pronto-stylelint.svg)](https://gemnasium.com/github.com/kevinjalbert/pronto-stylelint)
8
8
 
9
- Pronto runner for [stylelint](http://stylelint.io), the mighty, modern CSS linter. [What is Pronto?](https://github.com/mmozuras/pronto)
9
+ Pronto runner for [stylelint](http://stylelint.io), the mighty, modern CSS linter. [What is Pronto?](https://github.com/prontolabs/pronto)
10
10
 
11
11
  Uses official stylelint executable installed by `npm`.
12
12
 
@@ -26,15 +26,17 @@ pronto-stylelint can be configured by placing a `.pronto_stylelint.yml` inside t
26
26
 
27
27
  Following options are available:
28
28
 
29
- | Option | Meaning | Default |
30
- | -------------------- | ------------------------------------------------------------------------- | ----------------------------------------- |
31
- | stylelint_executable | stylelint executable to call. | `stylelint` (calls `stylelint` in `PATH`) |
32
- | cli_options | Options to pass to the CLI. | `-f json` |
29
+ | Option | Meaning | Default |
30
+ | -------------------- | ---------------------------------------------------------------------------------------- | ----------------------------------------- |
31
+ | stylelint_executable | stylelint executable to call. | `stylelint` (calls `stylelint` in `PATH`) |
32
+ | files_to_lint | What files to lint. Absolute path of offending file will be matched against this Regexp. | `\.(c\|sc\|sa\|le)ss$` |
33
+ | cli_options | Options to pass to the CLI. | `-f json` |
33
34
 
34
35
  Example configuration to call custom stylelint executable and specify custom options:
35
36
 
36
37
  ```yaml
37
38
  # .pronto_stylelint.yml
38
39
  stylelint_executable: '/my/custom/node/path/.bin/stylelint'
40
+ files_to_lint: '\.(c|sc)ss$'
39
41
  cli_options: '--config /custom/stylelintrc'
40
42
  ```
@@ -4,7 +4,7 @@ require 'shellwords'
4
4
  module Pronto
5
5
  class Stylelint < Runner
6
6
  CONFIG_FILE = '.pronto_stylelint.yml'.freeze
7
- CONFIG_KEYS = %w(stylelint_executable cli_options).freeze
7
+ CONFIG_KEYS = %w(stylelint_executable files_to_lint cli_options).freeze
8
8
 
9
9
  attr_writer :stylelint_executable, :cli_options
10
10
 
@@ -22,7 +22,11 @@ module Pronto
22
22
  end
23
23
 
24
24
  def files_to_lint
25
- /\.(c|sc|sa|le)ss$/.freeze
25
+ @files_to_lint || /\.(c|sc|sa|le)ss$/.freeze
26
+ end
27
+
28
+ def files_to_lint=(regexp)
29
+ @files_to_lint = regexp.is_a?(Regexp) ? regexp : Regexp.new(regexp)
26
30
  end
27
31
 
28
32
  def read_config
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module StylelintVersion
3
- VERSION = '0.9.0'.freeze
3
+ VERSION = '0.9.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto-stylelint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Jalbert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-25 00:00:00.000000000 Z
11
+ date: 2017-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pronto