Skip to content

Commit

Permalink
Release v0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas C. Zakas committed Sep 8, 2011
1 parent 7db1fb6 commit d461241
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 35 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
September 8, 2011 - v0.6.1

* Workaround for Node.js stdout not flushing prior to exit (fixes #176) (Nicholas C. Zakas)
* Ensure text-indent rule doesn't throw an error (fixes #179) (Nicholas C. Zakas)
* Added documentation for shorthand rule (Nicholas C. Zakas)
* Release v0.6.0 (Nicholas C. Zakas)

September 3, 2011 - v0.6.0

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




2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<project name="csslint" default="build.all">

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

<!-- the directories containing the source files -->
<property name="src.dir" value="./src" />
Expand Down
12 changes: 6 additions & 6 deletions release/csslint-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Build time: 3-September-2011 10:59:45 */
/* Build time: 8-September-2011 08:50:44 */
/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
Expand Down Expand Up @@ -5432,7 +5432,7 @@ var CSSLint = (function(){
formatters = [],
api = new parserlib.util.EventTarget();

api.version = "0.6.0";
api.version = "0.6.1";

//-------------------------------------------------------------------------
// Rule Management
Expand Down Expand Up @@ -7133,7 +7133,7 @@ CSSLint.addRule({
//event handler for end of rules
function endRule(event){
if (textIndent){
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);
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);
}
}

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

if (name == "text-indent" && value < -99){
textIndent = true;
if (name == "text-indent" && value.parts[0].value < -99){
textIndent = event.property;
} else if (name == "direction" && value == "ltr"){
textIndent = false;
}
Expand Down
12 changes: 6 additions & 6 deletions release/csslint-rhino.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Build time: 3-September-2011 10:59:45 */
/* Build time: 8-September-2011 08:50:44 */
var CSSLint = (function(){
/*!
Parser-Lib
Expand Down Expand Up @@ -5433,7 +5433,7 @@ var CSSLint = (function(){
formatters = [],
api = new parserlib.util.EventTarget();

api.version = "0.6.0";
api.version = "0.6.1";

//-------------------------------------------------------------------------
// Rule Management
Expand Down Expand Up @@ -7134,7 +7134,7 @@ CSSLint.addRule({
//event handler for end of rules
function endRule(event){
if (textIndent){
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);
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);
}
}

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

if (name == "text-indent" && value < -99){
textIndent = true;
if (name == "text-indent" && value.parts[0].value < -99){
textIndent = event.property;
} else if (name == "direction" && value == "ltr"){
textIndent = false;
}
Expand Down
7 changes: 7 additions & 0 deletions release/csslint-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,13 @@ background: -ms-linear-gradient(top, #1e5799 ,#2989d8 ,#207cca ,#7db9e8 );
"5px text-indent should not result in a warning": function(){
var result = CSSLint.verify(".foo{text-indent: 5px;}", {"text-indent": 1 });
Assert.areEqual(0, result.messages.length);
},

"This should cause a warning, not an error": function(){
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 });
Assert.areEqual(1, result.messages.length);
Assert.areEqual("warning", result.messages[0].type);
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);
}

}));
Expand Down
12 changes: 6 additions & 6 deletions release/csslint-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Build time: 3-September-2011 10:59:45 */
/* Build time: 8-September-2011 08:50:44 */
/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
Expand Down Expand Up @@ -5432,7 +5432,7 @@ var CSSLint = (function(){
formatters = [],
api = new parserlib.util.EventTarget();

api.version = "0.6.0";
api.version = "0.6.1";

//-------------------------------------------------------------------------
// Rule Management
Expand Down Expand Up @@ -7133,7 +7133,7 @@ CSSLint.addRule({
//event handler for end of rules
function endRule(event){
if (textIndent){
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);
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);
}
}

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

if (name == "text-indent" && value < -99){
textIndent = true;
if (name == "text-indent" && value.parts[0].value < -99){
textIndent = event.property;
} else if (name == "direction" && value == "ltr"){
textIndent = false;
}
Expand Down
12 changes: 6 additions & 6 deletions release/csslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Build time: 3-September-2011 10:59:45 */
/* Build time: 8-September-2011 08:50:44 */
var CSSLint = (function(){
/*!
Parser-Lib
Expand Down Expand Up @@ -5433,7 +5433,7 @@ var CSSLint = (function(){
formatters = [],
api = new parserlib.util.EventTarget();

api.version = "0.6.0";
api.version = "0.6.1";

//-------------------------------------------------------------------------
// Rule Management
Expand Down Expand Up @@ -7134,7 +7134,7 @@ CSSLint.addRule({
//event handler for end of rules
function endRule(event){
if (textIndent){
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);
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);
}
}

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

if (name == "text-indent" && value < -99){
textIndent = true;
if (name == "text-indent" && value.parts[0].value < -99){
textIndent = event.property;
} else if (name == "direction" && value == "ltr"){
textIndent = false;
}
Expand Down
6 changes: 6 additions & 0 deletions release/docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ Writing selectors such as `li.active` are unnecessary unless the element name ca

Rule ID: `overqualified-elements`

### Require shorthand properties

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

Rule ID: `shorthand`

## Maintainability & Duplication

These rules help to ensure your code is readable and maintainable by others.
Expand Down
15 changes: 12 additions & 3 deletions release/npm/cli.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node
/* Build time: 3-September-2011 10:59:45 */
/* Build time: 8-September-2011 08:50:44 */
/*
* Encapsulates all of the CLI functionality. The api argument simply
* provides environment-specific functionality.
Expand Down Expand Up @@ -205,11 +205,19 @@ cli({

print: function(message){
fs.writeSync(1, message + "\n");
fs.fsyncSync(1);
},

quit: function(code){
process.exit(code || 0);

//Workaround for https://github.com/joyent/node/issues/1669
var flushed = process.stdout.flush()
if (!flushed) {
process.once("drain", function () {
process.exit(code || 0)
});
} else {
process.exit(code || 0);
}
},

isDirectory: function(name){
Expand Down Expand Up @@ -258,3 +266,4 @@ cli({
}
});


12 changes: 6 additions & 6 deletions release/npm/lib/csslint-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* Build time: 3-September-2011 10:59:45 */
/* Build time: 8-September-2011 08:50:44 */
/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
Expand Down Expand Up @@ -5432,7 +5432,7 @@ var CSSLint = (function(){
formatters = [],
api = new parserlib.util.EventTarget();

api.version = "0.6.0";
api.version = "0.6.1";

//-------------------------------------------------------------------------
// Rule Management
Expand Down Expand Up @@ -7133,7 +7133,7 @@ CSSLint.addRule({
//event handler for end of rules
function endRule(event){
if (textIndent){
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);
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);
}
}

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

if (name == "text-indent" && value < -99){
textIndent = true;
if (name == "text-indent" && value.parts[0].value < -99){
textIndent = event.property;
} else if (name == "direction" && value == "ltr"){
textIndent = false;
}
Expand Down
2 changes: 1 addition & 1 deletion release/npm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "csslint",
"version": "0.6.0",
"version": "0.6.1",
"description": "CSSLint",
"author": "Nicholas C. Zakas",
"os": ["darwin", "linux"],
Expand Down

0 comments on commit d461241

Please sign in to comment.