Skip to content

Commit 004f9d7

Browse files
authored
Add prettier as a default formatter (#1353)
- Add config - Add npm script to check and reformat code - Add format check step to GitLab PR pipeline - Add .prettierignore - Reformat all files
1 parent 1d803bf commit 004f9d7

File tree

199 files changed

+5016
-4390
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+5016
-4390
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ jobs:
1313
- run: npm run build
1414
- run: npm run lint
1515
- run: npm run cover
16+
- run: npm run format:check

.prettierignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
**/*.yml
2+
**/*.yaml
3+
.github/
4+
.nyc_output/
5+
node_modules/
6+
lib/
7+
coverage/
8+
.vscode/
9+
.jshintrc

.prettierrc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"arrowParens": "always",
3+
"bracketSameLine": false,
4+
"bracketSpacing": true,
5+
"semi": true,
6+
"experimentalTernaries": false,
7+
"singleQuote": true,
8+
"jsxSingleQuote": true,
9+
"quoteProps": "consistent",
10+
"trailingComma": "all",
11+
"singleAttributePerLine": false,
12+
"htmlWhitespaceSensitivity": "css",
13+
"vueIndentScriptAndStyle": false,
14+
"proseWrap": "preserve",
15+
"insertPragma": false,
16+
"requirePragma": false,
17+
"tabWidth": 2,
18+
"useTabs": false,
19+
"embeddedLanguageFormatting": "auto",
20+
"printWidth": 240
21+
}

CONTRIBUTING.md

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,60 @@
11
# Contribution Guidelines
22

3-
Thank you for your support! node-soap wouldn't be where it is today without contributors like you who are willing to take the time to improve it for everyone else.
3+
Thank you for your support! node-soap wouldn't be where it is today without contributors like you who are willing to take the time to improve it for everyone else.
44

5-
Because SOAP Web Services can differ amongst implementations, there is high risk involved in making changes. What works for your WSDL, might not work with another. It is therefore _essential_ that contributors to node-soap adhere to these guidelines.
5+
Because SOAP Web Services can differ amongst implementations, there is high risk involved in making changes. What works for your WSDL, might not work with another. It is therefore _essential_ that contributors to node-soap adhere to these guidelines.
66

77
## Submitting a Pull Request
8-
* Pull Requests **must be rebased to the latest version of master and _squashed to a single commit_** i.e. `git checkout master;git pull upstream master;git checkout feature-branch;git rebase -i master`
9-
* Pull Requests **must have accompanying tests** (either Unit or Request/Response Sample tests are welcome). Your chances of getting the PR merged are very low if you don't provide any tests.
10-
* Pull Requests must have passing travis builds.
11-
* Pull Requests must be able to merge automatically from github.
12-
* Please **do not close a pull request due to a request to rebase**. Git is a powerful VCS and deserves your time in learning how to rebase properly. Pull Requests are updated automatically on github when you force push to your branch after rebasing.
8+
9+
- Pull Requests **must be rebased to the latest version of master and _squashed to a single commit_** i.e. `git checkout master;git pull upstream master;git checkout feature-branch;git rebase -i master`
10+
- Pull Requests **must have accompanying tests** (either Unit or Request/Response Sample tests are welcome). Your chances of getting the PR merged are very low if you don't provide any tests.
11+
- Pull Requests must have passing travis builds.
12+
- Pull Requests must be able to merge automatically from github.
13+
- Please **do not close a pull request due to a request to rebase**. Git is a powerful VCS and deserves your time in learning how to rebase properly. Pull Requests are updated automatically on github when you force push to your branch after rebasing.
1314

1415
Very useful articles/help on this topic:
15-
- [GitHub Help - About Git rebase](https://help.github.com/articles/about-git-rebase/)
16-
- [GitHub Help - Using Git rebase](https://help.github.com/articles/using-git-rebase/)
1716

18-
* Please use descriptive commit messages. Commit messages are used during the creation of history and release notes. You'll make the job of maintainers much easier by doing this.
17+
- [GitHub Help - About Git rebase](https://help.github.com/articles/about-git-rebase/)
18+
- [GitHub Help - Using Git rebase](https://help.github.com/articles/using-git-rebase/)
19+
20+
* Please use descriptive commit messages. Commit messages are used during the creation of history and release notes. You'll make the job of maintainers much easier by doing this.
1921

2022
## Making Changes
21-
* Any and all pull requests to change documentation or typos are welcome!
22-
* Any WSDL checked in should be as small and as generic as possible. This is to keep the size of the codebase from growing too large and to keep the reason for submitting the WSDL clear I.E. if the WSDL was submitted because attributes were not being parsed on response XML, then it would be appropriate to submit a WSDL that defines a response with attributes *and nothing else*. If you find an issue with the parser not being able to handle large WSDLs, then it would be appropriate to submit a large WSDL to recreate the issue with.
23-
* If your Pull Request is WSDL related:
24-
````
23+
24+
- Any and all pull requests to change documentation or typos are welcome!
25+
- Any WSDL checked in should be as small and as generic as possible. This is to keep the size of the codebase from growing too large and to keep the reason for submitting the WSDL clear I.E. if the WSDL was submitted because attributes were not being parsed on response XML, then it would be appropriate to submit a WSDL that defines a response with attributes _and nothing else_. If you find an issue with the parser not being able to handle large WSDLs, then it would be appropriate to submit a large WSDL to recreate the issue with.
26+
- If your Pull Request is WSDL related:
27+
28+
```
2529
1. Make your WSDL as generic as possible to recreate the issue
2630
2. Add the WSDL to the appropriate path in test/wsdl.
2731
3. Commit your changes to a feature branch within your fork.
2832
4. Issue a pull request.
29-
````
33+
```
3034

31-
* If your Pull Request is client related:
32-
````
35+
- If your Pull Request is client related:
36+
37+
```
3338
1. Capture the request / response XML via client.lastRequest and client.lastResponse as well as the WSDL.
3439
2. Make the WSDL, request, and response XML as generic as possible.
3540
3. Only include the messages or operations that are having issues.
3641
4. Add the appropriate files to test/request-response-samples (see the README therein)
3742
5. Commit your changes to a feature branch within your fork.
3843
6. Issue a pull request
39-
````
44+
```
45+
46+
- If your Pull Request is neither WSDL nor client related:
4047

41-
* If your Pull Request is neither WSDL nor client related:
42-
````
48+
```
4349
1. Provide a test of some form in an appropriate *-test.js file under test/
4450
2. Commit your changes to a feature branch within your fork.
4551
3. Issue a pull request.
46-
````
52+
```
4753

4854
## Issue Expiration
49-
Any pull request filed is subject to an expiration date. We will close any open Pull Request that has not received a response within a 2 week timeframe. The goal is not to sweep dirt under the rug, but to keep the focus on merging in pull requests. Please provide pull requests that meet the above criteria wherever possible.
55+
56+
Any pull request filed is subject to an expiration date. We will close any open Pull Request that has not received a response within a 2 week timeframe. The goal is not to sweep dirt under the rug, but to keep the focus on merging in pull requests. Please provide pull requests that meet the above criteria wherever possible.
5057

5158
## Other ways you can contribute
52-
Please add response, request, and WSDL files to test/wsdl, and test/request-response-samples (see README therein). Doing so documents behavior and reduces the likelihood that bugs will be introduced by future pull requests.
59+
60+
Please add response, request, and WSDL files to test/wsdl, and test/request-response-samples (see README therein). Doing so documents behavior and reduces the likelihood that bugs will be introduced by future pull requests.

PUBLISHING.md

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,33 @@
1-
Publishing
2-
===================
1+
# Publishing
32

43
This document describes the steps a maintainer of this project generally takes in
54
order to publish a newer version of `node-soap`.
65

76
## Ideals
8-
* Pull Requests that alter, add, or correct functionality have a single commit.
9-
* All commit messages are descriptive.
10-
* Maintainers spend little time looking at git history to update HISTORY.md.
7+
8+
- Pull Requests that alter, add, or correct functionality have a single commit.
9+
- All commit messages are descriptive.
10+
- Maintainers spend little time looking at git history to update HISTORY.md.
1111

1212
## Process
13-
1. Checkout the commit that you would like to publish. This is usually accomplished
13+
14+
1. Checkout the commit that you would like to publish. This is usually accomplished
1415
with `git checkout master`.
1516
2. Run `git log --oneline`
1617
3. Copy the commit messages above the last release commit message into History.md.
1718
4. Consolidate the commit messages:
18-
* Remove any futile commits I.E. "Removing white space"
19-
* Remove Pull Request merge commits. In some cases, you may need to reference the issue in
20-
order to get the commit message for that Pull Request.
21-
* Prefix commit messages with "Enhancement", "Fixed", "Deprecated" and so forth
22-
accordingly.
23-
* Reword line items as necessary.
19+
20+
- Remove any futile commits I.E. "Removing white space"
21+
- Remove Pull Request merge commits. In some cases, you may need to reference the issue in
22+
order to get the commit message for that Pull Request.
23+
- Prefix commit messages with "Enhancement", "Fixed", "Deprecated" and so forth
24+
accordingly.
25+
- Reword line items as necessary.
26+
2427
5. Update package.json to the appropriate version for the release.
2528
6. Commit your changes to master and push them up to github.
2629
7. Use the github interface to create a tag.
27-
* Use existing release notes as a reference when adding the release notes to github.
30+
31+
- Use existing release notes as a reference when adding the release notes to github.
32+
2833
8. `npm publish`.

0 commit comments

Comments
 (0)