yui/pure — pull request #65 by ericf (2013-06-05 18:14:54+00:00)
Title: Add CSSLint and `grunt test` task to lint CSS in the src/ dir

This adds a basic mechanism for us to sanity test the code by linting it.

For now I created a new Grunt task: `grunt test` which will run CSSLint on `src/` dir, minus `src/base/` and `forms-core.css` since the CSS in those files are imported from the Normalize.css project.

The `grunt-contrib-csslint` plugin which this uses is not great, and there doesn't appear to be a way to simply log warns in some cases, while erroring out the build in other cases. Because of this limitation I did **not** at the `test` task to the default `grunt` task. I did however change the `grunt release` task to first run `test`.

I setup some default CSSLint configuration which I thought seemed reasonable. These settings are in the `.csslintrc` file and are used by the Grunt plugin. Additionally, we can use comments to override the default ruleset like this:

```css
/*csslint unqualified-attributes:false*/
```

**Note:** Currently there are several CSSLint errors in the codebase, all of which I think we should try and fix; or at least use the above comment syntax to signal that a certain file is deviating from the default lint settings. Until these errors are cleaned up, the `--force` flag needs to be passed to `grunt release`, but I think this is a good thing so encourage us to fix these issues.

```shell
$ grunt release --force
```

I would like us to clean up our current lint errors ASAP so that we can enable Travis CI to run this process on all checkins and pull requests. Ideally, they's add more commits to this PR which fix our current lint issues!