Closed saebekassebil closed 10 years ago
If you try running cake lint:coffee
without having coffeelint
installed, an error should be output (or at least a warning).
Besides that, this looks allright.
@mzedeler: I've changed the code so that coffeelint
is now a dependency. The Cakefile
will not run if there hasn't been issued a $ npm install
command, so we're sure that coffeelint
will be in there if the cake lint:coffee
task is run.
Ready for merge?
:+1:
This PR creates two new tasks in the Cakefile:
cake lint:html
: Lints the HTML source code, which at the moment gives 16 validation errors/warningscake lint:coffee
: Lints the CoffeeScript source codeThe CoffeeScript linting is going to be a really nice feature once we've cleaned up the existing code. Then we can just check that our newly written source code complies to our style standards every time we want to do a pull request/merge. At the moment we get quite a few linting errors, and we'll also have to agree on some coding style standards, but for now I've disabled two features in the lint process, that I'd like to enable at some point later:
no_trailing_whitespace
, which is a most annoying issue when navigating a file with keyboard shortcuts, but also just good practice. At the moment there's a lot of trailing whitespace, so let's leave it for nowmax_line_length
should be set to around 80 or so, since that would allow for having multiple files opened side by side. Right now however we have some really long lines, which decreases readability and makes the file harder to navigate.These linting rules live in a lint config file I've called
.coffeelint.json
. If you'd like to call it something else, let me know and I'll change it.