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 +4 -4
- data/README.md +7 -5
- data/lib/pronto/stylelint.rb +6 -2
- data/lib/pronto/stylelint/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aea303d474a96584edd210b686f2717eaf7aa492
|
4
|
+
data.tar.gz: 9ec8722396e4e3ef3797f098a9d656ede07f8194
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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/
|
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
|
30
|
-
| -------------------- |
|
31
|
-
| stylelint_executable | stylelint executable to call.
|
32
|
-
|
|
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
|
```
|
data/lib/pronto/stylelint.rb
CHANGED
@@ -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
|
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.
|
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-
|
11
|
+
date: 2017-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pronto
|