UNPKG

2.21 kBMarkdownView Raw
1resin-lint
2==========
3
4`resin-lint` is a linter based on [coffeelint](https://github.com/clutchski/coffeelint),
5[coffeescope2](https://github.com/za-creature/coffeescope) and [tslint](https://palantir.github.io/tslint/) that detects style errors based on Resin.io coding guidelines.
6
7Overview
8--------
9
10`resin-lint` uses Resin's `coffeelint.json` and `tslint.json`. If a `coffeelint.json` or `tslint.json` is found in the to-be-linted project
11directory or its parents then the rules found in it will override the default `resin-lint` ones.
12Another way to to override the default resin-lint rules is by specifying a configuration
13file with the `-f` parameter.
14By default, only `.coffee` files will be linted. `.ts` and `.tsx` files can be
15linted by using the `--typescript` parameter.
16
17Usage
18-----
19
20You can use this module as:
21
221. A standalone project by installing it with `npm install -g resin-lint`:
23
24 ```
25 kostas@macbook:~/resin/test$ resin-lint src/
26 ✓ src/test.coffee
27
28 ✓ Ok! » 0 errors and 0 warnings in 1 file
29 ```
30
312. A development dependency in `package.json` with ```npm install --save-dev resin-lint```. Then
32 you can use the module in your build/testing process:
33
34 ```
35 package.json
36 ------------
37 ...
38 "scripts": {
39 "lint": "resin-lint src/ && echo \"Done!\""
40 },
41 ...
42
43 kostas@macbook:~/resin/test$ npm run lint
44
45 > test@1.0.0 lint /Users/kostas/resin/test
46 > resin-lint src/ && echo "Done!"
47
48 ✓ src/test.coffee
49
50 ✓ Ok! » 0 errors and 0 warnings in 1 file
51
52 Done!
53
54 ```
55
56Support
57-------
58
59If you're having any problem, please [raise an issue](https://github.com/resin-io/node-resin-lint/issues/new) on GitHub and the Resin.io team will be happy to help.
60
61Tests
62-----
63
64Run the test suite by doing:
65
66```sh
67$ npm install && npm test
68```
69
70Contribute
71----------
72
73- Issue Tracker: [github.com/resin-io/node-resin-lint/issues](https://github.com/resin-io/node-resin-lint/issues)
74- Source Code: [github.com/resin-io/node-resin-lint](https://github.com/resin-io/node-resin-lint)
75
76Before submitting a PR, please make sure that you include tests, and that `npm run lint` runs without a warning.
77
78License
79-------
80
81The project is licensed under the Apache 2.0 license.