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

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

Enable deployment with Grunt.

File size: 1.5 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## Options
17
18A few additional options are supported:
19
20### force
21Type: `Boolean`
22Default value: `false`
23
24Set `force` to `true` to report CoffeeLint errors but not fail the task.
25
26## Configuration
27
28`coffeelint` is a multitask, so you can use it similary to `lint`, `watch` etc...
29
30````javascript
31grunt.initConfig({
32    ...
33    coffeelint: {
34      app: ['app/*.coffee', 'scripts/*.coffee']
35      }
36    },
37    ...
38});
39````
40
41### Options per target
42
43````javascript
44grunt.initConfig({
45    ...
46    coffeelint: {
47      app: ['app/*.coffee', 'scripts/*.coffee'],
48      tests: {
49        files: {
50          src: ['tests/*.coffee']
51        },
52        options: {
53          'no_trailing_whitespace': {
54            'level': 'error'
55          }
56        }
57      }
58    },
59    ...
60});
61````
62
63### Global - default options
64
65````javascript
66grunt.initConfig({
67    ...
68    coffeelint: {
69      options: {
70        'no_trailing_whitespace': {
71          'level': 'error'
72        }
73      }
74    },
75    ...
76});
77````
78
79For available options see [coffeelint homepage].
80
81[CoffeeLint]: http://www.coffeelint.org/
82[coffeelint homepage]: http://www.coffeelint.org/
Note: See TracBrowser for help on using the repository browser.