Skip to content

Commit da95f42

Browse files
committed
Merge pull request #448 from sasstools/release/1.4.0
Release/1.4.0
2 parents 71c7b73 + 95d89c1 commit da95f42

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+5216
-537
lines changed

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,48 @@
11
# Sass Lint Changelog
22

3+
## v1.4.0
4+
**December 10, 2015**
5+
6+
The long overdue update!
7+
8+
**Changes**
9+
* The config file can now be cached for a small performance boost [#279](https://github.com/sasstools/sass-lint/issues/279)
10+
* Added an `ignore-custom-properties` option to the property sort order rule, allowing you to ignore/include non standard properties in your property sort orders [#302](https://github.com/sasstools/sass-lint/issues/302)
11+
* Streamlined the `force-pseudo-nesting`, `force-element-nesting` and `force-attribute-nesting` rules [#323](https://github.com/sasstools/sass-lint/pull/323)
12+
* Improved the testing of our config handling [#403](https://github.com/sasstools/sass-lint/issues/403)
13+
* Corrected the naming of the `no-misspelled-properties` tests [#405](https://github.com/sasstools/sass-lint/pull/405)
14+
* Updated some of our dependencies to their latest versions [#428](https://github.com/sasstools/sass-lint/pull/428)
15+
* `no-trailing-zero` now acts similar to the `no-unnecessary-mantissa` rule of scss-lint in that it warns about unnecessary decimals [#438](https://github.com/sasstools/sass-lint/issues/438)
16+
17+
**CLI**
18+
* [-s --syntax] Syntax flag allows you to specify syntax of the file(s) you wish to lint [#381](https://github.com/sasstools/sass-lint/issues/381)
19+
20+
**New Rules**
21+
* [space-around-operator](https://github.com/sasstools/sass-lint/blob/master/docs/rules/space-around-operator.md)
22+
* [class-name-format](https://github.com/sasstools/sass-lint/blob/master/docs/rules/class-name-format.md)
23+
* [id-name-format](https://github.com/sasstools/sass-lint/blob/master/docs/rules/id-name-format.md)
24+
* [property-units](https://github.com/sasstools/sass-lint/blob/master/docs/rules/property-units.md)
25+
* [bem-depth](https://github.com/sasstools/sass-lint/blob/master/docs/rules/bem-depth.md)
26+
27+
**Fixes**
28+
* Pre emptive fix for `space-around-operator` with negative values [#394](https://github.com/sasstools/sass-lint/issues/394)
29+
* Pre emptive fix for `space-around-operator` with percentage values [#425](https://github.com/sasstools/sass-lint/issues/425)
30+
* `no-trailing-zero` now works as expected with 0 values after a decimal [#439](https://github.com/sasstools/sass-lint/issues/439)
31+
* Percentage values are now correctly handled and reported in the `shorthand-values` rule [#435](https://github.com/sasstools/sass-lint/issues/435)
32+
* `function-name-format` no longer incorrectly reports on valid default CSS & Sass functions [#442](https://github.com/sasstools/sass-lint/pull/442)
33+
* Corrected a typo in config file documentation [#384](https://github.com/sasstools/sass-lint/pull/384)
34+
35+
**Brought to you by**
36+
37+
* [Sam Richard](https://github.com/Snugug)
38+
* [Ben Griffith](https://github.com/bgriffith)
39+
* [Dan Purdy](https://github.com/DanPurdy)
40+
* [Ben Rothman](https://github.com/benthemonkey)
41+
* [Don Abrams](https://github.com/donabrams)
42+
* [Kaelig](https://github.com/kaelig)
43+
44+
**A big thankyou to everyone who reported issues or contributed to the discussion around issues**
45+
346
## v1.3.3
447
**November 16, 2015**
548

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Sass Lint [![npm version](https://badge.fury.io/js/sass-lint.svg)](http://badge.fury.io/js/sass-lint) [![Build Status](https://travis-ci.org/sasstools/sass-lint.svg)](https://travis-ci.org/sasstools/sass-lint) [![Coverage Status](https://coveralls.io/repos/sasstools/sass-lint/badge.svg?branch=develop&service=github)](https://coveralls.io/github/sasstools/sass-lint?branch=develop)
1+
# Sass Lint [![npm version](https://badge.fury.io/js/sass-lint.svg)](http://badge.fury.io/js/sass-lint) [![Build Status](https://travis-ci.org/sasstools/sass-lint.svg)](https://travis-ci.org/sasstools/sass-lint) [![Coverage Status](https://coveralls.io/repos/sasstools/sass-lint/badge.svg?branch=develop&service=github)](https://coveralls.io/github/sasstools/sass-lint?branch=develop) [![Dependency Status](https://david-dm.org/sasstools/sass-lint.svg)](https://david-dm.org/sasstools/sass-lint#info=dependencies&view=list) [![Dev Dependency Status](https://david-dm.org/sasstools/sass-lint/dev-status.svg)](https://david-dm.org/sasstools/sass-lint#info=devDependencies&view=list)
22

33
A Node-only Sass linter for both `sass` and `scss` syntax!
44

@@ -12,6 +12,8 @@ npm install sass-lint --save-dev
1212

1313
Use the [Sample Config](docs/sass-lint.yml) as a guide to create your `.sass-lint.yml` in the root of where you are running Sass Lint from. The default configuration can be found [here](https://github.com/sasstools/sass-lint/blob/master/lib/config/sass-lint.yml).
1414

15+
*Migrating from SCSS-Lint*: If you already have a config for SCSS-Lint, you can instantly convert it to the equivalent Sass Lint config at [sasstools.github.io/make-sass-lint-config](http://sasstools.github.io/make-sass-lint-config/).
16+
1517
### Options
1618

1719
The following are options that you can use to config the Sass Linter.

bin/sass-lint.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ program
3232
.option('-v, --verbose', 'verbose output')
3333
.option('-f, --format [format]', 'pass one of the available eslint formats')
3434
.option('-o, --output [output]', 'the path and filename where you would like output to be written')
35+
.option('-s, --syntax [syntax]', 'syntax to evaluate the file(s) with (either sass or scss)')
3536
.parse(process.argv);
3637

3738

@@ -51,6 +52,10 @@ if (program.ignore && program.ignore !== true) {
5152
}
5253
}
5354

55+
if (program.syntax && ['sass', 'scss'].indexOf(program.syntax) > -1) {
56+
configOptions.syntax = program.syntax;
57+
}
58+
5459
if (program.format && program.format !== true) {
5560
if (configOptions.hasOwnProperty('options')) {
5661
configOptions.options.formatter = program.format;

data/functions.yml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
abs
2+
adjust-color
3+
adjust-hue
4+
alpha
5+
annotation
6+
append
7+
blue
8+
blur
9+
brightness
10+
calc
11+
call
12+
ceil
13+
change-color
14+
character-variant
15+
circle
16+
comparable
17+
complement
18+
contrast
19+
cubic-bezier
20+
custom
21+
darken
22+
desaturate
23+
drop-shadow
24+
element
25+
ellipse
26+
feature-exists
27+
floor
28+
function-exists
29+
global-variable-exists
30+
grayscale
31+
green
32+
hue
33+
hue-rotate
34+
hsl
35+
hsla
36+
if
37+
index
38+
inset
39+
inspect
40+
invert
41+
is-hex-str
42+
is-superselector
43+
join
44+
keywords
45+
length
46+
lighten
47+
lightness
48+
linear-gradient
49+
list-separator
50+
map-get
51+
map-has-key
52+
map-keys
53+
map-merge
54+
map-remove
55+
map-values
56+
matrix
57+
matrix3d
58+
min
59+
max
60+
mix
61+
mixin-exists
62+
nth
63+
ornaments
64+
opacify
65+
opacity
66+
percentage
67+
perspective
68+
polygon
69+
quote
70+
radial-gradient
71+
random
72+
rect
73+
red
74+
repeat
75+
repeating-linear-gradient
76+
repeating-radial-gradient
77+
rgb
78+
rgba
79+
rotate
80+
rotateX
81+
rotateY
82+
rotateZ
83+
rotate3d
84+
round
85+
saturate
86+
saturation
87+
scale
88+
scale-color
89+
scaleX
90+
scaleY
91+
scaleZ
92+
scale3d
93+
selector-nest
94+
selector-append
95+
selector-extend
96+
selector-replace
97+
selector-unify
98+
simple-selectors
99+
selector-parse
100+
set-nth
101+
sepia
102+
skewX
103+
skewY
104+
steps
105+
str-index
106+
str-insert
107+
str-length
108+
str-slice
109+
styleset
110+
stylistic
111+
swash
112+
symbols
113+
to-lower-case
114+
to-upper-case
115+
translate
116+
translateX
117+
translateY
118+
translateZ
119+
translate3d
120+
tran­spa­ren­tiz­e
121+
type-of
122+
unique-id
123+
unit
124+
unitless
125+
unquote
126+
url
127+
var
128+
variable-exists
129+
zip

docs/cli/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ Command Line Flag | Description
1818
`-i`,`--ignore [pattern]` | A pattern that should be ignored from linting. Multiple patterns can be used by separating each pattern by `, `. Patterns should be wrapped in quotes (will be merged with other ignore options)
1919
`-o`,`--output [output]` | The path plus file name relative to where Sass Lint is being run from where the output should be written to.
2020
`-q`,`--no-exit` | Prevents the CLI from throwing an error if there is one (useful for development work)
21+
`-s`,`--syntax` | Syntax to evaluate the given file(s) with, either sass or scss. Use with care: overrides filename extension-based syntax detection.
2122
`-v`,`--verbose` | Verbose output (fully formatted output)
2223
`-V`,`--version` | Outputs the version number of Sass Lint

docs/options/cache-config.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Cache Config
2+
3+
Option `cache-config` will tell Sass Lint to cache the current configuration for each invocation of sass-lint. This option is disabled by default but you may consider enabling it if you're not planning on modifying your `.sass-lint.yml` config file as there will be a small performance gain.
4+
5+
## Options
6+
7+
* `true`/`false` (defaults to `false`)

docs/rules/bem-depth.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# BEM Depth
2+
3+
Rule `bem-depth` will enforce how many elements a BEM selector can contain.
4+
5+
## Options
6+
7+
* `max-depth`: number (defaults to `1`)
8+
9+
## Examples
10+
11+
When enabled (assuming `max-depth: 1`) the following are disallowed:
12+
13+
```scss
14+
15+
.block {
16+
&__element {
17+
&__subelement {
18+
// two elements
19+
}
20+
}
21+
}
22+
23+
.block__element__subelement__subelement-two {
24+
// three elements
25+
}
26+
```

0 commit comments

Comments
 (0)