Skip to content

Commit

Permalink
Merge pull request #758 from sasstools/release/1.8.1
Browse files Browse the repository at this point in the history
Release/1.8.1
  • Loading branch information
DanPurdy authored Jun 23, 2016
2 parents 9ee2b85 + 2f5ff3c commit a3935d1
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 26 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Sass Lint Changelog

## v1.8.1

**June 23, 2016**

Parser patching

Gonzales-pe had a few important updates so we chose to do a patch release to make sure everyone gets to benefit from less parse errors as soon as possible!

**Fixes**
* Fixed an issue in `shorthand-values` where values within parenthesis would be ignored [#748](https://github.com/sasstools/sass-lint/issues/748)
* Corrected the documentation for `property-units` [#740](https://github.com/sasstools/sass-lint/issues/740)
* Fixed an issue where config files were not being recursively searched for [#756](https://github.com/sasstools/sass-lint/issues/756)

**Updates**
* Gonzales-pe updated to version 3.3.5 [see changelog](https://github.com/tonyganch/gonzales-pe/blob/v3.3.5/CHANGELOG.md#21062016-version-335) [#746](https://github.com/sasstools/sass-lint/pull/746)

## v1.8.0

**June 17, 2016**
Expand Down
3 changes: 1 addition & 2 deletions docs/rules/property-units.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ When enabled, `global` is set to `['px']`, and `per-property` is set to `{ width

```

When enabled, `globally-allowed-units` is set to `['em']`, and `units-allowed-for-properties` is set to `{ width: ['rem'] }` the following are allowed.
When enabled, `global` is set to `['em']`, and `per-property` is set to `{ width: ['rem'] }` the following are allowed.

```scss

Expand All @@ -47,4 +47,3 @@ $sizes: (
small: 2px
);
```

4 changes: 2 additions & 2 deletions lib/config-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ var findFile = function findFile (configPath, filename) {
configPath = configPath || path.join(process.cwd(), filename);

if (configPath && fs.existsSync(configPath)) {
dirname = path.dirname(configPath);
parentDirname = path.dirname(dirname);
return fs.realpathSync(configPath);
}
dirname = path.dirname(configPath);
parentDirname = path.dirname(dirname);

if (dirname === null || dirname === HOME || dirname === parentDirname) {
return null;
Expand Down
4 changes: 4 additions & 0 deletions lib/rules/shorthand-values.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ var scanValue = function (node) {
fullVal = func + '(' + args + ')';
}

else if (val.is('parentheses')) {
fullVal += '(' + scanValue(val).join(' ') + ')';
}

else if (val.is('space')) {
// This is a non value character such as a space
// We want to start another value here
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-lint",
"version": "1.8.0",
"version": "1.8.1",
"description": "All Node Sass linter!",
"main": "index.js",
"scripts": {
Expand Down Expand Up @@ -33,7 +33,7 @@
"fs-extra": "^0.30.0",
"glob": "^7.0.0",
"globule": "^1.0.0",
"gonzales-pe": "3.3.4",
"gonzales-pe": "3.3.5",
"js-yaml": "^3.5.4",
"lodash.capitalize": "^4.1.0",
"lodash.kebabcase": "^4.0.0",
Expand Down
32 changes: 16 additions & 16 deletions tests/rules/shorthand-values.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('shorthand values - scss', function () {
lint.test(file, {
'shorthand-values': 1
}, function (data) {
lint.assert.equal(64, data.warningCount);
lint.assert.equal(76, data.warningCount);
done();
});
});
Expand All @@ -28,7 +28,7 @@ describe('shorthand values - scss', function () {
}
]
}, function (data) {
lint.assert.equal(27, data.warningCount);
lint.assert.equal(32, data.warningCount);
done();
});
});
Expand All @@ -44,7 +44,7 @@ describe('shorthand values - scss', function () {
}
]
}, function (data) {
lint.assert.equal(32, data.warningCount);
lint.assert.equal(38, data.warningCount);
done();
});
});
Expand All @@ -60,7 +60,7 @@ describe('shorthand values - scss', function () {
}
]
}, function (data) {
lint.assert.equal(38, data.warningCount);
lint.assert.equal(45, data.warningCount);
done();
});
});
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('shorthand values - scss', function () {
}
]
}, function (data) {
lint.assert.equal(48, data.warningCount);
lint.assert.equal(57, data.warningCount);
done();
});
});
Expand All @@ -109,7 +109,7 @@ describe('shorthand values - scss', function () {
}
]
}, function (data) {
lint.assert.equal(54, data.warningCount);
lint.assert.equal(64, data.warningCount);
done();
});
});
Expand All @@ -126,7 +126,7 @@ describe('shorthand values - scss', function () {
}
]
}, function (data) {
lint.assert.equal(48, data.warningCount);
lint.assert.equal(57, data.warningCount);
done();
});
});
Expand All @@ -144,7 +144,7 @@ describe('shorthand values - scss', function () {
}
]
}, function (data) {
lint.assert.equal(64, data.warningCount);
lint.assert.equal(76, data.warningCount);
done();
});
});
Expand All @@ -161,7 +161,7 @@ describe('shorthand values - sass', function () {
lint.test(file, {
'shorthand-values': 1
}, function (data) {
lint.assert.equal(64, data.warningCount);
lint.assert.equal(76, data.warningCount);
done();
});
});
Expand All @@ -177,7 +177,7 @@ describe('shorthand values - sass', function () {
}
]
}, function (data) {
lint.assert.equal(27, data.warningCount);
lint.assert.equal(32, data.warningCount);
done();
});
});
Expand All @@ -193,7 +193,7 @@ describe('shorthand values - sass', function () {
}
]
}, function (data) {
lint.assert.equal(32, data.warningCount);
lint.assert.equal(38, data.warningCount);
done();
});
});
Expand All @@ -209,7 +209,7 @@ describe('shorthand values - sass', function () {
}
]
}, function (data) {
lint.assert.equal(38, data.warningCount);
lint.assert.equal(45, data.warningCount);
done();
});
});
Expand Down Expand Up @@ -241,7 +241,7 @@ describe('shorthand values - sass', function () {
}
]
}, function (data) {
lint.assert.equal(48, data.warningCount);
lint.assert.equal(57, data.warningCount);
done();
});
});
Expand All @@ -258,7 +258,7 @@ describe('shorthand values - sass', function () {
}
]
}, function (data) {
lint.assert.equal(54, data.warningCount);
lint.assert.equal(64, data.warningCount);
done();
});
});
Expand All @@ -275,7 +275,7 @@ describe('shorthand values - sass', function () {
}
]
}, function (data) {
lint.assert.equal(48, data.warningCount);
lint.assert.equal(57, data.warningCount);
done();
});
});
Expand All @@ -293,7 +293,7 @@ describe('shorthand values - sass', function () {
}
]
}, function (data) {
lint.assert.equal(64, data.warningCount);
lint.assert.equal(76, data.warningCount);
done();
});
});
Expand Down
28 changes: 28 additions & 0 deletions tests/sass/shorthand-values.sass
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
border-width: inherit
margin: 1rem
padding: 1px
padding: ($gutter / 2);

.value-two-ident
border-color: red red
Expand All @@ -13,6 +14,7 @@
border-width: inherit inherit
margin: 1rem 1rem
padding: 1px 1px
padding: ($gutter / 2) ($gutter / 2)

.value-two-diff
border-color: red blue
Expand All @@ -21,6 +23,7 @@
border-width: inherit 2em
margin: 1rem 2rem
padding: 1px 2px
padding: ($gutter / 2) ($gutter / 3)

.value-three-ident
border-color: red red red
Expand All @@ -29,6 +32,7 @@
border-width: inherit inherit inherit
margin: 1rem 1rem 1rem
padding: 1px 1px 1px
padding: ($gutter / 2) ($gutter / 2) ($gutter / 2)

.value-three-diff-one
border-color: blue red red
Expand All @@ -37,6 +41,7 @@
border-width: 10px inherit inherit
margin: 2rem 1rem 1rem
padding: 2px 1px 1px
padding: ($gutter / 3) ($gutter / 2) ($gutter / 2)

.value-three-diff-two
border-color: red blue red
Expand All @@ -45,6 +50,7 @@
border-width: inherit 10px inherit
margin: 1rem 2rem 1rem
padding: 1px 2px 1px
padding: ($gutter / 2) ($gutter / 3) ($gutter / 2)

.value-three-diff-three
border-color: red red blue
Expand All @@ -53,6 +59,7 @@
border-width: inherit inherit 10px
margin: 1rem 1rem 2rem
padding: 1px 1px 2px
padding: ($gutter / 2) ($gutter / 2) ($gutter / 3)

.value-three-diff-four
border-color: red blue orange
Expand All @@ -61,6 +68,7 @@
border-width: inherit 10px 20px
margin: 1rem 2rem 3rem
padding: 1px 2px 3px
padding: ($gutter / 2) ($gutter / 3) ($gutter / 4)

.value-four-ident
border-color: red red red red
Expand All @@ -69,6 +77,7 @@
border-width: inherit inherit inherit inherit
margin: 1rem 1rem 1rem 1rem
padding: 1px 1px 1px 1px
padding: ($gutter / 2) ($gutter / 2) ($gutter / 2) ($gutter / 2)

.value-four-diff-one
border-color: blue red red red
Expand All @@ -77,6 +86,7 @@
border-width: 10px inherit inherit inherit
margin: 2rem 1rem 1rem 1rem
padding: 2px 1px 1px 1px
padding: ($gutter / 3) ($gutter / 2) ($gutter / 2) ($gutter / 2)

.value-four-diff-two
border-color: red blue red red
Expand All @@ -85,6 +95,7 @@
border-width: inherit 10px inherit inherit
margin: 1rem 2rem 1rem 1rem
padding: 1px 2px 1px 1px
padding: ($gutter / 2) ($gutter / 3) ($gutter / 2) ($gutter / 2)

.value-four-diff-three
border-color: red red blue red
Expand All @@ -93,6 +104,7 @@
border-width: inherit inherit 10px inherit
margin: 1rem 1rem 2rem 1rem
padding: 1px 1px 2px 1px
padding: ($gutter / 2) ($gutter / 2) ($gutter / 3) ($gutter / 2)

.value-four-diff-four
border-color: red red red blue
Expand All @@ -101,6 +113,7 @@
border-width: inherit inherit inherit 10px
margin: 1rem 1rem 1rem 2rem
padding: 1px 1px 1px 2px
padding: ($gutter / 2) ($gutter / 2) ($gutter / 2) ($gutter / 3)

.value-four-diff-five
border-color: red blue red blue
Expand All @@ -109,6 +122,7 @@
border-width: inherit 10px inherit 10px
margin: 1rem 2rem 1rem 2rem
padding: 1px 2px 1px 2px
padding: ($gutter / 2) ($gutter / 3) ($gutter / 2) ($gutter / 3)

.value-four-diff-six
border-color: red blue orange green
Expand All @@ -117,6 +131,7 @@
border-width: inherit 10px 20px 30px
margin: 1rem 2rem 3rem 4rem
padding: 1px 2px 3px 4px
padding: ($gutter / 2) ($gutter / 3) ($gutter / 4) ($gutter / 5)

.value-four-ident
border-color: $red $red $red $red
Expand All @@ -131,45 +146,58 @@
border-width: none
margin: 0 0px
padding: 1px 0
padding: ($gutter / 2) 0

.value-mixed
border-color: $red 1px red 1rem
border-radius: 1px 1pc 1rem
border-style: $red red
border-width: 1px 1pc
padding: ($gutter / 2) 1px

.value-negative
margin: -1px
padding: -($gutter / 2)

.value-two-negative
margin: -1px -1px
padding: -($gutter / 2) -($gutter / 2)

.value-two-diff-negative
margin: -1px 1px
padding: -($gutter / 2) ($gutter / 2)

.value-three-diff-one-negative
margin: -1px -2px -1px
padding: -($gutter / 2) -($gutter / 3) -($gutter / 2)

.value-three-diff-two-negative
margin: -1px -2px 1px
padding: -($gutter / 2) -($gutter / 3) ($gutter / 2)

.value-four-negative
margin: -1px -1px -1px -1px
padding: -($gutter / 2) -($gutter / 2) -($gutter / 2) -($gutter / 2)

.value-four-diff-one-negative
margin: -1px -1px -1px 1px
padding: -($gutter / 2) -($gutter / 2) -($gutter / 2) ($gutter / 2)

.value-four-diff-two-negative
margin: -1px 1px -1px 1px
padding: -($gutter / 2) ($gutter / 2) -($gutter / 2) ($gutter / 2)

.value-four-diff-three-negative
margin: -1px 1px 1px 1px
padding: -($gutter / 2) ($gutter / 2) ($gutter / 2) ($gutter / 2)

.value-four-diff-four-negative
margin: -1px 2px 3px -4px
padding: -($gutter / 2) ($gutter / 3) ($gutter / 4) -($gutter / 5)

.value-four-diff-four-negative-mixed
margin: -1px 1px -1rem -1rem
padding: -($gutter / 2) ($gutter / 2) -($gutter-ex / 2) -($gutter-ex / 2)

.value-percentage
margin: 1%
Expand Down
Loading

0 comments on commit a3935d1

Please sign in to comment.