source: Dev/trunk/node_modules/grunt-coffeelint/README.md @ 484

Last change on this file since 484 was 484, checked in by hendrikvanantwerpen, 11 years ago

Commit node_modules, to make checkouts and builds more deterministic.

File size: 1.4 KB
Line 
1[![build status](https://secure.travis-ci.org/vojtajina/grunt-coffeelint.png)](http://travis-ci.org/vojtajina/grunt-coffeelint)
2# grunt-coffeelint
3
4**Lint your CoffeeScript by [CoffeeLint].**
5
6## Installation
7
8Install npm package, next to your project's `Gruntfile.js` file:
9
10    npm install grunt-coffeelint
11
12Add this line to your project's `Gruntfile.js`:
13
14    grunt.loadNpmTasks('grunt-coffeelint');
15
16
17## Configuration
18
19`coffeelint` is a multitask, so you can use it similary to `lint`, `watch` etc...
20
21````javascript
22grunt.initConfig({
23    ...
24    coffeelint: {
25      app: ['app/*.coffee', 'scripts/*.coffee']
26      }
27    },
28    ...
29});
30````
31
32### Options per target
33
34````javascript
35grunt.initConfig({
36    ...
37    coffeelint: {
38      app: ['app/*.coffee', 'scripts/*.coffee'],
39      tests: {
40        files: {
41          src: ['tests/*.coffee']
42        },
43        options: {
44          'no_trailing_whitespace': {
45            'level': 'error'
46          }
47        }
48      }
49    },
50    ...
51});
52````
53
54### Global - default options
55
56````javascript
57grunt.initConfig({
58    ...
59    coffeelint: {
60      options: {
61        'no_trailing_whitespace': {
62          'level': 'error'
63        }
64      }
65    },
66    ...
67});
68````
69
70For available options see [example configuration] or [coffeelint homepage].
71
72
73[CoffeeLint]: http://www.coffeelint.org/
74[coffeelint homepage]: http://www.coffeelint.org/
75[example configuration]: https://raw.github.com/clutchski/coffeelint/master/examples/coffeelint.json
Note: See TracBrowser for help on using the repository browser.