You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+57Lines changed: 57 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,62 @@
1
1
# Sass Lint Changelog
2
2
3
+
## v1.10.0
4
+
5
+
**November 6th, 2016**
6
+
7
+
The 'you can ignore those bad habits again' update
8
+
9
+
**:tada: DISABLE LINTERS :tada:**
10
+
The ability to enable and disable linters on the fly has finally(!) been added [#677](https://github.com/sasstools/sass-lint/pull/677)[docs](https://github.com/sasstools/sass-lint/blob/master/docs/toggle-rules-in-src.md)
11
+
12
+
A massive thank you to everyone who commented/contributed/reported and tested this feature this was very much a community effort here. An extra special thank you to
13
+
*[@donabrams](https://github.com/donabrams)
14
+
15
+
For his initial hard work in getting this off the ground. There were lots of others who have fixed everything from test issues to AST issues to make this possible afterwards, so thanks to you too!
16
+
17
+
**New Features**
18
+
*`max-warnings` which is available with the sass-lint CLI is now available as an option in your config file too [#857](https://github.com/sasstools/sass-lint/pull/857)
***New Rule**`max-line-length` rule was added [#840](https://github.com/sasstools/sass-lint/pull/840)[docs](https://github.com/sasstools/sass-lint/blob/master/docs/rules/max-line-length.md)
21
+
***New Rule**`max-file-line-count` rule was added [#842](https://github.com/sasstools/sass-lint/pull/842)[docs](https://github.com/sasstools/sass-lint/blob/master/docs/rules/max-file-line-count.md)
22
+
***New Rule**`declarations-before-nesting` rule was added [#866](https://github.com/sasstools/sass-lint/pull/866)[docs](https://github.com/sasstools/sass-lint/blob/master/docs/rules/declarations-before-nesting.md)
23
+
24
+
**Fixes**
25
+
* Fixed an issue with an un handled error being thrown in certain circumstances for the `space-before-colon` rule [#894](https://github.com/sasstools/sass-lint/pull/894)
26
+
* Operators in variable names are now handled correctly for the `variable-name-format` rule [#903](https://github.com/sasstools/sass-lint/pull/903)
27
+
* Fixed an issue with string values in the `shorthand-values` rule [#848](https://github.com/sasstools/sass-lint/pull/848)
28
+
* Fixed an issue with valid strict BEM producing an error in the `*-name-format` rules [#892](https://github.com/sasstools/sass-lint/pull/892)
29
+
* Fixed an issue with non-string user conventions in the `border-zero` rule [#913](https://github.com/sasstools/sass-lint/pull/913)
30
+
* Fixed an issue where BOM markers in files were causing parse errors or random errors/warnings [#893](https://github.com/sasstools/sass-lint/pull/893)
31
+
* Fixed an issue with interpolates properties in the `no-duplicate-properties` rule [#915](https://github.com/sasstools/sass-lint/pull/915)
32
+
* Fixed a possible error with invalid user conventions in the `border-zero` rule [#926](https://github.com/sasstools/sass-lint/pull/926)
33
+
34
+
**Changes**
35
+
* Node 0.10 and 0.12 are no longer officially supported by sass-lint. We've not deliberately broken these builds but we will no longer be testing against them either [#896](https://github.com/sasstools/sass-lint/issues/896) & [#924](https://github.com/sasstools/sass-lint/pull/924)
36
+
* In future the `no-url-protocols` rule will not lint domains in URL's for now a new flag is added to mimic this behaviour. The new `no-url-domains` rule can be used instead [#813](https://github.com/sasstools/sass-lint/issues/813)
37
+
* Front matter such as those present in Jekyll templates will now be ignored in all files before passing to the AST / Linting [897](https://github.com/sasstools/sass-lint/pull/897)
38
+
* Running the tests no longer required sass-lint development to be `npm-link`ed or globally installed. [#911](https://github.com/sasstools/sass-lint/pull/911)
39
+
* The concentric property list in `property-sort-order` was updated to reflect the latest release [#922](https://github.com/sasstools/sass-lint/pull/922)
40
+
41
+
**Updates**
42
+
* AST fixes have arrived with version 3.4.7 of gonzales-pe [#906](https://github.com/sasstools/sass-lint/pull/906)
43
+
* Updated to the latest versions of many other packages
44
+
45
+
**Documentation**
46
+
* The documentation around configuring a rule was tidied up and made clearer [#910](https://github.com/sasstools/sass-lint/pull/910)
Copy file name to clipboardExpand all lines: README.md
+101-5Lines changed: 101 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,19 +79,97 @@ For all [rules](https://github.com/sasstools/sass-lint/tree/master/docs/rules),
79
79
80
80
If you want to configure options, set the rule to an array, where the first item in the array is the severity, and the second item in the array is an object including the options you would like to set.
81
81
82
-
An example configuration of a rule with options look like the following:
82
+
Here is an example configuration of a rule, where we are specifying that breaking the [indentation rule](https://github.com/sasstools/sass-lint/blob/master/docs/rules/indentation.md) should be treated as an error (its severity set to two), and setting the `size` option of the rule to 2 spaces:
Special comments can be used to disable and enable certain rules throughout your source files in a variety of scenarios. These can be useful when dealing with legacy code or with certain necessary code smells. You can read the documentation for this feature [here](https://github.com/sasstools/sass-lint/tree/master/docs/toggle-rules-in-src.md).
### Disable all lints within a block (and all contained blocks)
131
+
132
+
```scss
133
+
p {
134
+
// sass-lint:disable-block border-zero
135
+
border: none; // No result reported
136
+
}
137
+
138
+
a {
139
+
border: none; // Failing result reported
140
+
}
141
+
```
142
+
143
+
### Disable and enable again
144
+
145
+
```scss
146
+
// sass-lint:disable border-zero
147
+
p {
148
+
border: none; // No result reported
149
+
}
150
+
// sass-lint:enable border-zero
151
+
152
+
a {
153
+
border: none; // Failing result reported
154
+
}
155
+
```
156
+
157
+
### Disable/enable all linters
158
+
159
+
```scss
160
+
// sass-lint:disable-all
161
+
p {
162
+
border: none; // No result reported
163
+
}
164
+
// sass-lint:enable-all
165
+
166
+
a {
167
+
border: none; // Failing result reported
168
+
}
169
+
```
170
+
171
+
---
172
+
95
173
## CLI
96
174
97
175
Sass Lint [`v1.1.0`](https://github.com/sasstools/sass-lint/releases/tag/v1.1.0) introduced the ability to run Sass Lint through a command line interface. See the [CLI Docs](https://github.com/sasstools/sass-lint/tree/master/docs/cli) for full documentation on how to use the CLI.
@@ -169,6 +247,24 @@ For further information you can visit our CLI documentation linked below.
169
247
170
248
---
171
249
250
+
## Front matter
251
+
252
+
Certain static site generators such as [Jekyll](http://jekyllrb.com/docs/frontmatter/) include the YAML front matter block at the top of their scss file. Sass-lint by default checks a file for this block and attempts to parse your Sass without this front matter. You can see an example of a front matter block below.
253
+
254
+
```scss
255
+
256
+
---
257
+
# Only the main Sass file needs front matter (the dashes are enough)
258
+
---
259
+
260
+
.test {
261
+
color: red;
262
+
}
263
+
264
+
```
265
+
266
+
---
267
+
172
268
## Contributions
173
269
174
270
We welcome all contributions to this project but please do read our [contribution guidelines](https://github.com/sasstools/sass-lint/blob/master/CONTRIBUTING.md) first, especially before opening a pull request. It would also be good to read our [code of conduct](https://github.com/sasstools/sass-lint/blob/master/CODE_OF_CONDUCT.md).
0 commit comments