Skip to content

Commit

Permalink
Merge pull request #448 from sasstools/release/1.4.0
Browse files Browse the repository at this point in the history
Release/1.4.0
  • Loading branch information
DanPurdy committed Dec 10, 2015
2 parents 71c7b73 + 95d89c1 commit da95f42
Show file tree
Hide file tree
Showing 71 changed files with 5,216 additions and 537 deletions.
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Sass Lint Changelog

## v1.4.0
**December 10, 2015**

The long overdue update!

**Changes**
* The config file can now be cached for a small performance boost [#279](https://github.com/sasstools/sass-lint/issues/279)
* 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)
* Streamlined the `force-pseudo-nesting`, `force-element-nesting` and `force-attribute-nesting` rules [#323](https://github.com/sasstools/sass-lint/pull/323)
* Improved the testing of our config handling [#403](https://github.com/sasstools/sass-lint/issues/403)
* Corrected the naming of the `no-misspelled-properties` tests [#405](https://github.com/sasstools/sass-lint/pull/405)
* Updated some of our dependencies to their latest versions [#428](https://github.com/sasstools/sass-lint/pull/428)
* `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)

**CLI**
* [-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)

**New Rules**
* [space-around-operator](https://github.com/sasstools/sass-lint/blob/master/docs/rules/space-around-operator.md)
* [class-name-format](https://github.com/sasstools/sass-lint/blob/master/docs/rules/class-name-format.md)
* [id-name-format](https://github.com/sasstools/sass-lint/blob/master/docs/rules/id-name-format.md)
* [property-units](https://github.com/sasstools/sass-lint/blob/master/docs/rules/property-units.md)
* [bem-depth](https://github.com/sasstools/sass-lint/blob/master/docs/rules/bem-depth.md)

**Fixes**
* Pre emptive fix for `space-around-operator` with negative values [#394](https://github.com/sasstools/sass-lint/issues/394)
* Pre emptive fix for `space-around-operator` with percentage values [#425](https://github.com/sasstools/sass-lint/issues/425)
* `no-trailing-zero` now works as expected with 0 values after a decimal [#439](https://github.com/sasstools/sass-lint/issues/439)
* Percentage values are now correctly handled and reported in the `shorthand-values` rule [#435](https://github.com/sasstools/sass-lint/issues/435)
* `function-name-format` no longer incorrectly reports on valid default CSS & Sass functions [#442](https://github.com/sasstools/sass-lint/pull/442)
* Corrected a typo in config file documentation [#384](https://github.com/sasstools/sass-lint/pull/384)

**Brought to you by**

* [Sam Richard](https://github.com/Snugug)
* [Ben Griffith](https://github.com/bgriffith)
* [Dan Purdy](https://github.com/DanPurdy)
* [Ben Rothman](https://github.com/benthemonkey)
* [Don Abrams](https://github.com/donabrams)
* [Kaelig](https://github.com/kaelig)

**A big thankyou to everyone who reported issues or contributed to the discussion around issues**

## v1.3.3
**November 16, 2015**

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 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)
# 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)

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

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

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).

*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/).

### Options

The following are options that you can use to config the Sass Linter.
Expand Down
5 changes: 5 additions & 0 deletions bin/sass-lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ program
.option('-v, --verbose', 'verbose output')
.option('-f, --format [format]', 'pass one of the available eslint formats')
.option('-o, --output [output]', 'the path and filename where you would like output to be written')
.option('-s, --syntax [syntax]', 'syntax to evaluate the file(s) with (either sass or scss)')
.parse(process.argv);


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

if (program.syntax && ['sass', 'scss'].indexOf(program.syntax) > -1) {
configOptions.syntax = program.syntax;
}

if (program.format && program.format !== true) {
if (configOptions.hasOwnProperty('options')) {
configOptions.options.formatter = program.format;
Expand Down
129 changes: 129 additions & 0 deletions data/functions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
abs
adjust-color
adjust-hue
alpha
annotation
append
blue
blur
brightness
calc
call
ceil
change-color
character-variant
circle
comparable
complement
contrast
cubic-bezier
custom
darken
desaturate
drop-shadow
element
ellipse
feature-exists
floor
function-exists
global-variable-exists
grayscale
green
hue
hue-rotate
hsl
hsla
if
index
inset
inspect
invert
is-hex-str
is-superselector
join
keywords
length
lighten
lightness
linear-gradient
list-separator
map-get
map-has-key
map-keys
map-merge
map-remove
map-values
matrix
matrix3d
min
max
mix
mixin-exists
nth
ornaments
opacify
opacity
percentage
perspective
polygon
quote
radial-gradient
random
rect
red
repeat
repeating-linear-gradient
repeating-radial-gradient
rgb
rgba
rotate
rotateX
rotateY
rotateZ
rotate3d
round
saturate
saturation
scale
scale-color
scaleX
scaleY
scaleZ
scale3d
selector-nest
selector-append
selector-extend
selector-replace
selector-unify
simple-selectors
selector-parse
set-nth
sepia
skewX
skewY
steps
str-index
str-insert
str-length
str-slice
styleset
stylistic
swash
symbols
to-lower-case
to-upper-case
translate
translateX
translateY
translateZ
translate3d
tran­spa­ren­tiz­e
type-of
unique-id
unit
unitless
unquote
url
var
variable-exists
zip
1 change: 1 addition & 0 deletions docs/cli/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ Command Line Flag | Description
`-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)
`-o`,`--output [output]` | The path plus file name relative to where Sass Lint is being run from where the output should be written to.
`-q`,`--no-exit` | Prevents the CLI from throwing an error if there is one (useful for development work)
`-s`,`--syntax` | Syntax to evaluate the given file(s) with, either sass or scss. Use with care: overrides filename extension-based syntax detection.
`-v`,`--verbose` | Verbose output (fully formatted output)
`-V`,`--version` | Outputs the version number of Sass Lint
7 changes: 7 additions & 0 deletions docs/options/cache-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Cache Config

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.

## Options

* `true`/`false` (defaults to `false`)
26 changes: 26 additions & 0 deletions docs/rules/bem-depth.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# BEM Depth

Rule `bem-depth` will enforce how many elements a BEM selector can contain.

## Options

* `max-depth`: number (defaults to `1`)

## Examples

When enabled (assuming `max-depth: 1`) the following are disallowed:

```scss

.block {
&__element {
&__subelement {
// two elements
}
}
}

.block__element__subelement__subelement-two {
// three elements
}
```
Loading

0 comments on commit da95f42

Please sign in to comment.