Skip to content

Commit a7541ee

Browse files
author
JAMES FUQIAN
committed
make lint quiet.
1 parent 7656459 commit a7541ee

4 files changed

Lines changed: 53 additions & 12 deletions

File tree

.github/pull_request_template.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!--
2+
You've got a Pull Request you want to submit? Awesome!
3+
This PR template is here to help ensure you're setup for success:
4+
please fill it out to help ensure that your PR is complete and ready for approval.
5+
-->
6+
7+
**JIRA Ticket:**
8+
[SOMEPROJECT-42](https://jira.cms.gov/browse/SOMEPROJECT-42)
9+
10+
**User Story or Bug Summary:**
11+
12+
<!-- Please copy-paste the brief user story or bug description that this PR is intended to address. -->
13+
14+
### What Does This PR Do?
15+
16+
<!--
17+
Add detailed description & discussion of changes here.
18+
The contents of this section should be used as your commit message (unless you merge the PR via a merge commit, of course).
19+
20+
Please follow standard Git commit message guidelines:
21+
* First line should be a capitalized, short (50 chars or less) summary.
22+
* The rest of the message should be in standard Markdown format, wrapped to 72 characters.
23+
* Describe your changes in imperative mood, e.g. "make xyzzy do frotz" instead of "[This patch] makes xyzzy do frotz" or "[I] changed xyzzy to do frotz", as if you are giving orders to the codebase to change its behavior.
24+
* List all relevant Jira issue keys, one per line at the end of the message, per: <https://confluence.atlassian.com/jirasoftwarecloud/processing-issues-with-smart-commits-788960027.html>.
25+
26+
Reference: <https://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project>.
27+
-->
28+
29+
### What Should Reviewers Watch For?
30+
31+
<!--
32+
Add some items to the following list, or remove the entire section if it doesn't apply for some reason.
33+
34+
Common items include:
35+
* Is this likely to address the goals expressed in the user story?
36+
* Are any additional documentation updates needed?
37+
* Are there any unhandled and/or untested edge cases you can think of?
38+
* Is user input properly sanitized & handled?
39+
* Does this make any backwards-incompatible changes that might break end user clients?
40+
* Can you find any bugs if you run the code locally and test it manually?
41+
-->
42+
43+
If you're reviewing this PR, please check these things, in particular:
44+
45+
- TODO

server/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.0.0",
44
"scripts": {
55
"build": "./node_modules/.bin/ts-node build.ts",
6-
"lint": "eslint --ext .ts --ext .js --ext .tsx .",
6+
"lint": "eslint --fix --ext .ts --ext .tsx .",
77
"start": "node -r module-alias/register ./dist --env=production",
88
"start:debug": "node --inspect=0.0.0.0:9229 ./node_modules/.bin/ts-node -r tsconfig-paths/register ./src",
99
"start:dev": "nodemon",
@@ -53,7 +53,8 @@
5353
"@typescript-eslint/no-explicit-any": 0,
5454
"@typescript-eslint/no-floating-promises": 0,
5555
"@typescript-eslint/no-unsafe-member-access": 0,
56-
"@typescript-eslint/no-unsafe-assignment": 0
56+
"@typescript-eslint/no-unsafe-assignment": 0,
57+
"@typescript-eslint/no-unsafe-call": 0
5758
}
5859
},
5960
"eslintIgnore": [

server/src/__tests__/server_test.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ const BB2_EOB_URL = `${BB2_BASE_URL}/v2/fhir/ExplanationOfBenefit/`;
1515

1616
const BB2_PROFILE_URL = `${BB2_BASE_URL}/v2/connect/userinfo`;
1717

18-
const BB2_AUTH_TOKEN_URL = `${BB2_BASE_URL}/v2/o/token/`;
19-
2018
const eob = { status: 200, data: { resource: "EOB" } };
2119

2220
const coverage = { status: 200, data: { resource: "Coverage" } };
@@ -42,8 +40,7 @@ const MOCK_AUTH_TOKEN = new AuthorizationToken(MOCK_AUTH_TOKEN_RESPONSE.data);
4240
let server: any;
4341

4442
beforeAll(() => {
45-
server = app.listen(Number(3003), () => {
46-
});
43+
server = app.listen(Number(3003));
4744
});
4845

4946
afterAll(() => {
@@ -52,7 +49,7 @@ afterAll(() => {
5249

5350
test("expect patient end point returns patient data.", async () => {
5451
// mock patient returned at deeper layer
55-
jest.spyOn(reqs, 'get').mockImplementation((url, params, token) =>
52+
jest.spyOn(reqs, 'get').mockImplementation((url) =>
5653
{
5754
if (url === BB2_PATIENT_URL) {
5855
return Promise.resolve(patient);
@@ -70,7 +67,7 @@ test("expect patient end point returns patient data.", async () => {
7067

7168
test("expect profile end point returns profile data.", async () => {
7269
// mock profile returned at lower level get
73-
jest.spyOn(reqs, 'get').mockImplementation((url, params, token) =>
70+
jest.spyOn(reqs, 'get').mockImplementation((url) =>
7471
{
7572
if (url === BB2_PROFILE_URL) {
7673
return Promise.resolve(profile);
@@ -86,7 +83,7 @@ test("expect profile end point returns profile data.", async () => {
8683

8784
test("expect coverage end point returns coverage data.", async () => {
8885
// mock coverage returned at deeper layer
89-
jest.spyOn(reqs, 'get').mockImplementation((url, params, token) =>
86+
jest.spyOn(reqs, 'get').mockImplementation((url) =>
9087
{
9188
if (url === BB2_COVERAGE_URL) {
9289
return Promise.resolve(coverage);
@@ -108,7 +105,7 @@ test("expect eob end point returns eob data.", async () => {
108105
loggedInUser.authToken = MOCK_AUTH_TOKEN;
109106

110107
// mock eob returned at lower level get
111-
jest.spyOn(reqs, 'get').mockImplementation((url, params, token) =>
108+
jest.spyOn(reqs, 'get').mockImplementation((url) =>
112109
{
113110
if (url === BB2_EOB_URL) {
114111
return Promise.resolve(eob);
@@ -119,7 +116,6 @@ test("expect eob end point returns eob data.", async () => {
119116
);
120117

121118
const response = await axios.get("http://localhost:3003/api/data/benefit-direct");
122-
console.log(response);
123119
expect(response.status).toEqual(200);
124120
expect(response.data).toEqual(eob.data);
125121
});

server/src/pre-start/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
* Pre-start is where we want to place things that must run BEFORE the express server is started.
33
* This is useful for environment variables, command-line arguments, and cron-jobs.
44
*/
5-
65
import path from 'path';
76
import dotenv from 'dotenv';
87
import commandLineArgs from 'command-line-args';

0 commit comments

Comments
 (0)