Skip to content

Commit 143a5e0

Browse files
Changes:
1. Added Linter 2. Added Prettier 3. Added pre-commit hook to run test, prettier and linter 4. Added badges like code style, downloads and license
1 parent ada88f7 commit 143a5e0

File tree

119 files changed

+11047
-10297
lines changed

Some content is hidden

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

119 files changed

+11047
-10297
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+13-12
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

10-
### Prerequisites
9+
# Bug Report
10+
11+
## Prerequisites
1112

12-
* [ ] Can you reproduce the problem?
13-
* [ ] Are you running the latest version?
14-
* [ ] Are you reporting to the correct repository?
15-
* [ ] Did you perform a cursory search?
13+
- [ ] Can you reproduce the problem?
14+
- [ ] Are you running the latest version?
15+
- [ ] Are you reporting to the correct repository?
16+
- [ ] Did you perform a cursory search?
1617

1718
For more information, see the `CONTRIBUTING` guide.
1819

19-
### Description
20+
## Description
2021

2122
[Description of the bug or feature]
2223

2324
**Console Errors:** [Is there any console error]
2425

2526
**Screenshots:** [If applicable, add screenshots to help explain your problem]
2627

27-
### Steps to Reproduce
28+
## Steps to Reproduce
2829

2930
1. [First Step]
3031
2. [Second Step]
@@ -34,6 +35,6 @@ For more information, see the `CONTRIBUTING` guide.
3435

3536
**Actual behavior:** [What actually happened]
3637

37-
### Additional context
38+
## Additional context
3839

3940
Add any other context about the problem here..
+13-8
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
---
22
name: Feature request
33
about: Suggest an idea for this project
4-
title: ''
5-
labels: ''
6-
assignees: ''
7-
4+
title: ""
5+
labels: ""
6+
assignees: ""
87
---
98

10-
**Is your feature request related to a problem? Please describe.**
9+
# Feature Request
10+
11+
## Is your feature request related to a problem? Please describe
12+
1113
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
1214

13-
**Describe the solution you'd like**
15+
## Describe the solution you'd like
16+
1417
A clear and concise description of what you want to happen.
1518

16-
**Describe alternatives you've considered**
19+
## Describe alternatives you've considered
20+
1721
A clear and concise description of any alternative solutions or features you've considered.
1822

19-
**Additional context**
23+
## Additional context
24+
2025
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE/pull_request_template.md

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
A similar PR may already be submitted!
2-
Please search among the [Pull request](https://github.com/microsoftgraph/msgraph-sdk-javascript/pulls) before creating one.
1+
A similar PR may already be submitted! Please search among the [Pull request](https://github.com/microsoftgraph/msgraph-sdk-javascript/pulls) before creating one.
32

43
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request.
54

@@ -22,18 +21,22 @@ Demonstrate the code is solid. Example: The exact commands you ran and their out
2221
## Closing issues
2322

2423
<!-- Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such). -->
24+
2525
Fixes #
2626

2727
## Types of changes
28+
2829
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
29-
- [ ] Bug fix (non-breaking change which fixes an issue)
30-
- [ ] New feature (non-breaking change which adds functionality)
31-
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
30+
31+
- [ ] Bug fix (non-breaking change which fixes an issue)
32+
- [ ] New feature (non-breaking change which adds functionality)
33+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
3234

3335
## Checklist
34-
- [ ] I have read the **CONTRIBUTING** document.
35-
- [ ] My code follows the code style of this project.
36-
- [ ] My change requires a change to the documentation.
37-
- [ ] I have updated the documentation accordingly.
38-
- [ ] I have added tests to cover my changes.
39-
- [ ] All new and existing tests passed.
36+
37+
- [ ] I have read the **CONTRIBUTING** document.
38+
- [ ] My code follows the code style of this project.
39+
- [ ] My change requires a change to the documentation.
40+
- [ ] I have updated the documentation accordingly.
41+
- [ ] I have added tests to cover my changes.
42+
- [ ] All new and existing tests passed.

.huskyrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"hooks": {
3+
"pre-commit": "npm run lint && npm run format && npm run build && npm run test"
4+
}
5+
}

.jshintrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"esnext": "true"
3-
}
3+
}

.prettierignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
lib/
2+
3+
src/**/*.js
4+
src/**/*.js.map
5+
src/**/*.d.ts
6+
7+
spec/**/*.js
8+
spec/**/*.js.map
9+
spec/**/*.d.ts

.prettierrc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"arrowParens": "always",
3+
"bracketSpacing": true,
4+
"jsxBracketSameLine": true,
5+
"jsxSingleQuote": false,
6+
"printWidth": 5000,
7+
"proseWrap": "never",
8+
"semi": true,
9+
"singleQuote": false,
10+
"tabWidth": 4,
11+
"trailingComma": "all",
12+
"useTabs": true
13+
}

.vscode/launch.json

+59-54
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,61 @@
11
{
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5-
"version": "0.2.0",
6-
"configurations": [
7-
{
8-
"type": "node",
9-
"request": "launch",
10-
"name": "Run node samples",
11-
"program": "${workspaceRoot}/samples/node/main.js",
12-
"cwd": "${workspaceRoot}",
13-
"outFiles": [],
14-
"internalConsoleOptions": "openOnSessionStart"
15-
},
16-
{
17-
"type": "node",
18-
"request": "launch",
19-
"name": "Run core tests",
20-
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
21-
"args": [
22-
"${workspaceRoot}/lib/spec/core/*.js"
23-
],
24-
"cwd": "${workspaceRoot}",
25-
"preLaunchTask": "Run Build",
26-
"outFiles": [],
27-
"internalConsoleOptions": "openOnSessionStart"
28-
},
29-
{
30-
"type": "node",
31-
"request": "launch",
32-
"name": "Run workload tests",
33-
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
34-
"args": [
35-
"${workspaceRoot}/spec/development/workload/*.js"
36-
],
37-
"cwd": "${workspaceRoot}",
38-
"preLaunchTask": "Run Build",
39-
"outFiles": [],
40-
"internalConsoleOptions": "openOnSessionStart"
41-
},
42-
{
43-
"type": "node",
44-
"request": "launch",
45-
"name": "Run middleware tests",
46-
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
47-
"args": [
48-
"${workspaceRoot}/spec/middleware/*.js"
49-
],
50-
"cwd": "${workspaceRoot}",
51-
"preLaunchTask": "Run Build",
52-
"outFiles": [],
53-
"internalConsoleOptions": "openOnSessionStart"
54-
}
55-
]
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Run node samples",
11+
"program": "${workspaceRoot}/samples/node/main.js",
12+
"cwd": "${workspaceRoot}",
13+
"outFiles": [],
14+
"internalConsoleOptions": "openOnSessionStart"
15+
},
16+
{
17+
"type": "node",
18+
"request": "launch",
19+
"name": "Run core tests",
20+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
21+
"args": ["${workspaceRoot}/lib/spec/core/*.js"],
22+
"cwd": "${workspaceRoot}",
23+
"preLaunchTask": "Run Build",
24+
"outFiles": [],
25+
"internalConsoleOptions": "openOnSessionStart"
26+
},
27+
{
28+
"type": "node",
29+
"request": "launch",
30+
"name": "Run workload tests",
31+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
32+
"args": ["${workspaceRoot}/spec/development/workload/*.js"],
33+
"cwd": "${workspaceRoot}",
34+
"preLaunchTask": "Run Build",
35+
"outFiles": [],
36+
"internalConsoleOptions": "openOnSessionStart"
37+
},
38+
{
39+
"type": "node",
40+
"request": "launch",
41+
"name": "Run middleware tests",
42+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
43+
"args": ["${workspaceRoot}/lib/spec/middleware/*.js"],
44+
"cwd": "${workspaceRoot}",
45+
"preLaunchTask": "Run Build",
46+
"outFiles": [],
47+
"internalConsoleOptions": "openOnSessionStart"
48+
},
49+
{
50+
"type": "node",
51+
"request": "launch",
52+
"name": "Run Content tests",
53+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
54+
"args": ["${workspaceRoot}/lib/spec/content/*.js"],
55+
"cwd": "${workspaceRoot}",
56+
"preLaunchTask": "Run Build",
57+
"outFiles": [],
58+
"internalConsoleOptions": "openOnSessionStart"
59+
}
60+
]
5661
}

.vscode/tasks.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
// See https://go.microsoft.com/fwlink/?LinkId=733558
3-
// for the documentation about the tasks.json format
4-
"version": "2.0.0",
5-
"tasks": [
6-
{
7-
"label": "Run Build",
8-
"type": "npm",
9-
"script": "build",
10-
"group": "build"
11-
}
12-
]
13-
}
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Run Build",
8+
"type": "npm",
9+
"script": "build",
10+
"group": "build"
11+
}
12+
]
13+
}

0 commit comments

Comments
 (0)