Skip to content

Commit 83d57e2

Browse files
committed
Add contributor guidelines mentioning code-linting
1 parent 92ecc1e commit 83d57e2

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

CONTRIBUTING.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
# Contributing to gmail.js
3+
4+
## Documentation
5+
6+
If you introduce new API calls or features, please ensure they are
7+
documented. Having it both in the `README.md`-file and as code-doc
8+
makes it easier to use for everyone!
9+
10+
## Code quality
11+
12+
Gmail.js tries to keep a consistent code-quality and style-guide.
13+
14+
To enforce this, `eslint` is used.
15+
16+
Before submitting any patches, please run check that you have not
17+
increased the amount of warnings, or caused any linting-errors. You
18+
can do this by running `npm run lint`:
19+
20+
````bash
21+
$ npm install
22+
$ npm run lint
23+
24+
> [email protected] test /home/jostein/build/gmail.js
25+
> eslint src/*.js
26+
27+
28+
/home/jostein/build/gmail.js/src/gmail.js
29+
650:66 warning 'j' is defined but never used no-unused-vars
30+
691:48 warning 'xhr' is defined but never used no-unused-vars
31+
942:85 warning 'password' is defined but never used no-unused-vars
32+
1086:44 warning 'response' is defined but never used no-unused-vars
33+
1122:65 warning 'callbacks' is defined but never used no-unused-vars
34+
1442:86 warning 'sub' is defined but never used no-unused-vars
35+
36+
✖ 6 problems (0 errors, 6 warnings)
37+
38+
````
39+
40+
Submissions with actual linting-errors will not be accepted, and
41+
linting-warnings should be taken as that: Your code may not be doing
42+
what you think it does.
43+
44+
## Anything else?
45+
46+
Apart from that: Feel free to send in patches and help improve this
47+
library. All patches are appreciated!

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
- I still need to add implementation for chrome extension, works by injecting js for now
1515
- Main methods allow you to observe certain events with **`gmail.observe.on('lots_of_actions_here', callback())`** or similar **`gmail.observe.before(...)`** and **`gmail.observe.after(...)`**
1616
- Click on a method link to view more detailed docs
17-
- Create an issue/pull request for feedback, requests and fixes
17+
- Create an issue/pull request for feedback, requests and
18+
fixes. See
19+
[CONTRIBUTING.md](https://github.com/KartikTalwar/gmail.js/blob/master/CONTRIBUTING.md) for
20+
more details.
1821
- Basic TypeScript-support from type-declarations file [gmail.d.ts](https://github.com/KartikTalwar/gmail.js/blob/master/src/gmail.d.ts).
1922

2023
### Installation

0 commit comments

Comments
 (0)