Skip to content

Commit d461241

Browse files
author
Nicholas C. Zakas
committed
Release v0.6.1
1 parent 7db1fb6 commit d461241

File tree

11 files changed

+65
-35
lines changed

11 files changed

+65
-35
lines changed

CHANGELOG

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
September 8, 2011 - v0.6.1
2+
3+
* Workaround for Node.js stdout not flushing prior to exit (fixes #176) (Nicholas C. Zakas)
4+
* Ensure text-indent rule doesn't throw an error (fixes #179) (Nicholas C. Zakas)
5+
* Added documentation for shorthand rule (Nicholas C. Zakas)
6+
* Release v0.6.0 (Nicholas C. Zakas)
7+
18
September 3, 2011 - v0.6.0
29

310
* Updated changelog task in build script (Nicholas C. Zakas)
@@ -119,3 +126,4 @@ June 15, 2011 - v0.1.0
119126

120127

121128

129+

build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<project name="csslint" default="build.all">
22

33
<!-- version number -->
4-
<property name="csslint.version" value="0.6.0" />
4+
<property name="csslint.version" value="0.6.1" />
55

66
<!-- the directories containing the source files -->
77
<property name="src.dir" value="./src" />

release/csslint-node.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 3-September-2011 10:59:45 */
24+
/* Build time: 8-September-2011 08:50:44 */
2525
/*!
2626
Parser-Lib
2727
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
@@ -5432,7 +5432,7 @@ var CSSLint = (function(){
54325432
formatters = [],
54335433
api = new parserlib.util.EventTarget();
54345434

5435-
api.version = "0.6.0";
5435+
api.version = "0.6.1";
54365436

54375437
//-------------------------------------------------------------------------
54385438
// Rule Management
@@ -7133,7 +7133,7 @@ CSSLint.addRule({
71337133
//event handler for end of rules
71347134
function endRule(event){
71357135
if (textIndent){
7136-
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", name.line, name.col, rule);
7136+
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", textIndent.line, textIndent.col, rule);
71377137
}
71387138
}
71397139

@@ -7143,10 +7143,10 @@ CSSLint.addRule({
71437143
//check for use of "font-size"
71447144
parser.addListener("property", function(event){
71457145
var name = event.property.toString().toLowerCase(),
7146-
value = event.value.parts[0].value;
7146+
value = event.value;
71477147

7148-
if (name == "text-indent" && value < -99){
7149-
textIndent = true;
7148+
if (name == "text-indent" && value.parts[0].value < -99){
7149+
textIndent = event.property;
71507150
} else if (name == "direction" && value == "ltr"){
71517151
textIndent = false;
71527152
}

release/csslint-rhino.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 3-September-2011 10:59:45 */
24+
/* Build time: 8-September-2011 08:50:44 */
2525
var CSSLint = (function(){
2626
/*!
2727
Parser-Lib
@@ -5433,7 +5433,7 @@ var CSSLint = (function(){
54335433
formatters = [],
54345434
api = new parserlib.util.EventTarget();
54355435

5436-
api.version = "0.6.0";
5436+
api.version = "0.6.1";
54375437

54385438
//-------------------------------------------------------------------------
54395439
// Rule Management
@@ -7134,7 +7134,7 @@ CSSLint.addRule({
71347134
//event handler for end of rules
71357135
function endRule(event){
71367136
if (textIndent){
7137-
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", name.line, name.col, rule);
7137+
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", textIndent.line, textIndent.col, rule);
71387138
}
71397139
}
71407140

@@ -7144,10 +7144,10 @@ CSSLint.addRule({
71447144
//check for use of "font-size"
71457145
parser.addListener("property", function(event){
71467146
var name = event.property.toString().toLowerCase(),
7147-
value = event.value.parts[0].value;
7147+
value = event.value;
71487148

7149-
if (name == "text-indent" && value < -99){
7150-
textIndent = true;
7149+
if (name == "text-indent" && value.parts[0].value < -99){
7150+
textIndent = event.property;
71517151
} else if (name == "direction" && value == "ltr"){
71527152
textIndent = false;
71537153
}

release/csslint-tests.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,6 +1230,13 @@ background: -ms-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
12301230
"5px text-indent should not result in a warning": function(){
12311231
var result = CSSLint.verify(".foo{text-indent: 5px;}", {"text-indent": 1 });
12321232
Assert.areEqual(0, result.messages.length);
1233+
},
1234+
1235+
"This should cause a warning, not an error": function(){
1236+
var result = CSSLint.verify(".top h1 a { background: url(../images/background/logo.png) no-repeat; display: block; height: 44px; position: relative; text-indent: -9999px; width: 250px; }", { "text-indent": 1 });
1237+
Assert.areEqual(1, result.messages.length);
1238+
Assert.areEqual("warning", result.messages[0].type);
1239+
Assert.areEqual("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", result.messages[0].message);
12331240
}
12341241

12351242
}));

release/csslint-worker.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 3-September-2011 10:59:45 */
24+
/* Build time: 8-September-2011 08:50:44 */
2525
/*!
2626
Parser-Lib
2727
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
@@ -5432,7 +5432,7 @@ var CSSLint = (function(){
54325432
formatters = [],
54335433
api = new parserlib.util.EventTarget();
54345434

5435-
api.version = "0.6.0";
5435+
api.version = "0.6.1";
54365436

54375437
//-------------------------------------------------------------------------
54385438
// Rule Management
@@ -7133,7 +7133,7 @@ CSSLint.addRule({
71337133
//event handler for end of rules
71347134
function endRule(event){
71357135
if (textIndent){
7136-
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", name.line, name.col, rule);
7136+
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", textIndent.line, textIndent.col, rule);
71377137
}
71387138
}
71397139

@@ -7143,10 +7143,10 @@ CSSLint.addRule({
71437143
//check for use of "font-size"
71447144
parser.addListener("property", function(event){
71457145
var name = event.property.toString().toLowerCase(),
7146-
value = event.value.parts[0].value;
7146+
value = event.value;
71477147

7148-
if (name == "text-indent" && value < -99){
7149-
textIndent = true;
7148+
if (name == "text-indent" && value.parts[0].value < -99){
7149+
textIndent = event.property;
71507150
} else if (name == "direction" && value == "ltr"){
71517151
textIndent = false;
71527152
}

release/csslint.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 3-September-2011 10:59:45 */
24+
/* Build time: 8-September-2011 08:50:44 */
2525
var CSSLint = (function(){
2626
/*!
2727
Parser-Lib
@@ -5433,7 +5433,7 @@ var CSSLint = (function(){
54335433
formatters = [],
54345434
api = new parserlib.util.EventTarget();
54355435

5436-
api.version = "0.6.0";
5436+
api.version = "0.6.1";
54375437

54385438
//-------------------------------------------------------------------------
54395439
// Rule Management
@@ -7134,7 +7134,7 @@ CSSLint.addRule({
71347134
//event handler for end of rules
71357135
function endRule(event){
71367136
if (textIndent){
7137-
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", name.line, name.col, rule);
7137+
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", textIndent.line, textIndent.col, rule);
71387138
}
71397139
}
71407140

@@ -7144,10 +7144,10 @@ CSSLint.addRule({
71447144
//check for use of "font-size"
71457145
parser.addListener("property", function(event){
71467146
var name = event.property.toString().toLowerCase(),
7147-
value = event.value.parts[0].value;
7147+
value = event.value;
71487148

7149-
if (name == "text-indent" && value < -99){
7150-
textIndent = true;
7149+
if (name == "text-indent" && value.parts[0].value < -99){
7150+
textIndent = event.property;
71517151
} else if (name == "direction" && value == "ltr"){
71527152
textIndent = false;
71537153
}

release/docs/rules.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ Writing selectors such as `li.active` are unnecessary unless the element name ca
152152

153153
Rule ID: `overqualified-elements`
154154

155+
### Require shorthand properties
156+
157+
Sometimes when editing a rule you may end up defining multiple properties that can better be represented using shorthand. This rule checks to see if you're using `margin-left`, `margin-right`, `margin-top`, and `margin-bottom` together and suggests to use just `margin` instead. The same is done for the variants of `padding`.
158+
159+
Rule ID: `shorthand`
160+
155161
## Maintainability & Duplication
156162

157163
These rules help to ensure your code is readable and maintainable by others.

release/npm/cli.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env node
2-
/* Build time: 3-September-2011 10:59:45 */
2+
/* Build time: 8-September-2011 08:50:44 */
33
/*
44
* Encapsulates all of the CLI functionality. The api argument simply
55
* provides environment-specific functionality.
@@ -205,11 +205,19 @@ cli({
205205

206206
print: function(message){
207207
fs.writeSync(1, message + "\n");
208-
fs.fsyncSync(1);
209208
},
210209

211210
quit: function(code){
212-
process.exit(code || 0);
211+
212+
//Workaround for https://github.com/joyent/node/issues/1669
213+
var flushed = process.stdout.flush()
214+
if (!flushed) {
215+
process.once("drain", function () {
216+
process.exit(code || 0)
217+
});
218+
} else {
219+
process.exit(code || 0);
220+
}
213221
},
214222

215223
isDirectory: function(name){
@@ -258,3 +266,4 @@ cli({
258266
}
259267
});
260268

269+

release/npm/lib/csslint-node.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 3-September-2011 10:59:45 */
24+
/* Build time: 8-September-2011 08:50:44 */
2525
/*!
2626
Parser-Lib
2727
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
@@ -5432,7 +5432,7 @@ var CSSLint = (function(){
54325432
formatters = [],
54335433
api = new parserlib.util.EventTarget();
54345434

5435-
api.version = "0.6.0";
5435+
api.version = "0.6.1";
54365436

54375437
//-------------------------------------------------------------------------
54385438
// Rule Management
@@ -7133,7 +7133,7 @@ CSSLint.addRule({
71337133
//event handler for end of rules
71347134
function endRule(event){
71357135
if (textIndent){
7136-
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", name.line, name.col, rule);
7136+
reporter.warn("Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.", textIndent.line, textIndent.col, rule);
71377137
}
71387138
}
71397139

@@ -7143,10 +7143,10 @@ CSSLint.addRule({
71437143
//check for use of "font-size"
71447144
parser.addListener("property", function(event){
71457145
var name = event.property.toString().toLowerCase(),
7146-
value = event.value.parts[0].value;
7146+
value = event.value;
71477147

7148-
if (name == "text-indent" && value < -99){
7149-
textIndent = true;
7148+
if (name == "text-indent" && value.parts[0].value < -99){
7149+
textIndent = event.property;
71507150
} else if (name == "direction" && value == "ltr"){
71517151
textIndent = false;
71527152
}

0 commit comments

Comments
 (0)