Skip to content

Commit e36da2c

Browse files
committed
Update docs
1 parent 090dbc2 commit e36da2c

File tree

4 files changed

+31
-9
lines changed

4 files changed

+31
-9
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Contribution guidelines
2+
3+
When contributing to this repository, please first discuss the change you wish to make via issue,
4+
email, or any other method with the owners of this repository before making a change. This avoids extra work for both you and us.
5+
6+
## Pull Request Process
7+
8+
1. Fork the repo and create your branch from `master`.
9+
1. Implement your changes.
10+
1. If applicable to your changes, add, remove or update tests.
11+
1. If applicable to your change, update the readme accordingly.
12+
1. Run the tests and make sure they pass using `npm run test`. This will also run the linter.
13+
1. Create a new pull request!
14+
15+
## We use the MIT licence
16+
17+
You can read our licence [here](https://github.com/scriptcoded/sql-highlight/blob/master/LICENSE).
18+
19+
## License
20+
By contributing, you agree that your contributions will be licensed under its MIT License.

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ npm install sql-highlight
2121
```
2222

2323
## Usage
24-
> Note that we're using ES6 import statements here. Usage with `require` works
25-
> just as well.
2624

2725
**In its most basic form:**
2826
```js
29-
import { highlight } from 'sql-highlight'
27+
const { highlight } = require('sql-highlight')
3028

3129
const sqlString = "SELECT `id`, `username` FROM `users` WHERE `email` = '[email protected]'"
3230

@@ -37,7 +35,7 @@ console.log(highlighted)
3735

3836
**Output:**
3937

40-
![Screenshot 1](screenshot1.png)
38+
![Screenshot](screenshot.png)
4139

4240
**HTML mode:**
4341

@@ -91,11 +89,15 @@ The following options may be passed to the `highlight` function.
9189

9290
## Contributing
9391

94-
1. Fork it (<https://github.com/scriptcoded/sql-highlight/fork>)
95-
2. Create your feature branch (`git checkout -b feature/fooBar`)
96-
3. Commit your changes (`git commit -am 'Add some fooBar'`)
97-
4. Push to the branch (`git push origin feature/fooBar`)
98-
5. Create a new Pull Request
92+
See the [contribution guidelines](CONTRIBUTING.md).
93+
94+
## Tests
95+
96+
We use [Jest](https://jestjs.io/) for running our tests. The test suite can be run by running `npm run test`. This will run both Jest and ESLint.
97+
98+
## Code style
99+
100+
We use [ESLint](https://eslint.org/) for making sure that our code remains pretty and consistent throughout the project. If your editor doesn't automatically pick up our config you can lint the code using `npm run lint`.
99101

100102
## Additional information
101103

screenshot.png

8.19 KB
Loading

screenshot1.png

-3.88 KB
Binary file not shown.

0 commit comments

Comments
 (0)