Skip to content

Commit 955aa02

Browse files
committed
committing copilot changes for now to compare later
1 parent 3f529c6 commit 955aa02

File tree

11 files changed

+73
-6865
lines changed

11 files changed

+73
-6865
lines changed

client/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ COPY . .
1313

1414
# In case machine is Mac M1 chip
1515
RUN node --version
16-
RUN yarn install
16+
RUN npm ci --legacy-peer-deps
1717
# comment build out if not going to use preview to save build time
18-
RUN yarn build
18+
RUN npm run build
1919

2020
EXPOSE 3000
2121

22-
CMD ["sh", "-c", "yarn $BB2_APP_LAUNCH"]
22+
CMD ["sh", "-c", "npm run $BB2_APP_LAUNCH"]

client/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ const compat = new FlatCompat({
1313
});
1414

1515
export default [{
16-
ignores: [],
16+
ignores: ['build.ts', 'src/configs/config.ts'],
1717
}, ...fixupConfigRules(compat.extends("react-app"))];

client/package.json

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,7 @@
2929
"test": "TEST_APP_API_URL=http://localhost:3000 vitest",
3030
"coverage": "TEST_APP_API_URL=http://localhost:3000 vitest run --coverage"
3131
},
32-
"eslintConfig": {
33-
"extends": [
34-
"react-app",
35-
"react-app/jest"
36-
]
37-
},
32+
3833
"browserslist": {
3934
"production": [
4035
">0.2%",
@@ -48,18 +43,18 @@
4843
]
4944
},
5045
"devDependencies": {
51-
"@eslint/compat": "^1.2.3",
46+
"@eslint/compat": "^1.4.0",
5247
"@testing-library/jest-dom": "^5.16.5",
5348
"@testing-library/react": "^13.4.0",
5449
"@testing-library/user-event": "^13.5.0",
5550
"@types/jest": "^29.1.2",
5651
"@types/react-router-dom": "^5.3.3",
57-
"@typescript-eslint/eslint-plugin": "^5.12.0",
58-
"@typescript-eslint/parser": "^5.12.0",
52+
"@typescript-eslint/eslint-plugin": "^8.44.1",
53+
"@typescript-eslint/parser": "^8.44.1",
5954
"@vitest/coverage-v8": "2.1.6",
60-
"eslint": "^9.16.0",
55+
"eslint": "^9.36.0",
6156
"eslint-config-react-app": "^7.0.1",
62-
"eslint-plugin-react": "^7.28.0",
57+
"eslint-plugin-react": "^7.37.5",
6358
"jsdom": "^25.0.1",
6459
"react-error-overlay": "6.0.9",
6560
"vite": "^6.0.0",

client/yarn.lock

Lines changed: 0 additions & 6772 deletions
This file was deleted.

server/.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

server/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ COPY . .
99

1010
# In case machine is Mac M1 chip
1111
RUN node --version
12-
RUN yarn install
12+
RUN npm ci --legacy-peer-deps
1313

1414
EXPOSE 3001
1515

16-
CMD ["yarn","start:debug"]
16+
CMD ["npm","run","start:debug"]

server/eslint.config.mjs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import { fixupConfigRules } from '@eslint/compat';
2+
import path from 'node:path';
3+
import { fileURLToPath } from 'node:url';
4+
import js from '@eslint/js';
5+
import { FlatCompat } from '@eslint/eslintrc';
6+
7+
const __filename = fileURLToPath(import.meta.url);
8+
const __dirname = path.dirname(__filename);
9+
const compat = new FlatCompat({
10+
baseDirectory: __dirname,
11+
recommendedConfig: js.configs.recommended,
12+
allConfig: js.configs.all
13+
});
14+
15+
export default [
16+
{
17+
ignores: ['build.ts', 'src/configs/config.ts'],
18+
},
19+
...fixupConfigRules(compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking')),
20+
{
21+
languageOptions: {
22+
parser: await import('@typescript-eslint/parser').then(m => m.default || m),
23+
parserOptions: {
24+
project: './tsconfig.json'
25+
}
26+
},
27+
rules: {
28+
'max-len': ['error', { code: 100 }],
29+
'no-console': 1,
30+
'no-extra-boolean-cast': 0,
31+
'@typescript-eslint/restrict-plus-operands': 0,
32+
'@typescript-eslint/explicit-module-boundary-types': 0,
33+
'@typescript-eslint/no-explicit-any': 0,
34+
'@typescript-eslint/no-floating-promises': 0,
35+
'@typescript-eslint/no-unsafe-member-access': 0,
36+
'@typescript-eslint/no-unsafe-assignment': 0,
37+
'@typescript-eslint/no-unsafe-call': 0
38+
}
39+
}
40+
];

server/eslintrc.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

server/index.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,18 @@ app.get("/api/bluebutton/callback", (req: Request, res: Response) => {
7979
loggedInUser.authToken = authToken;
8080

8181
loggedInUser.eobData = eobResults.response?.data;
82-
} catch (e) {
82+
} catch (e) {
8383
loggedInUser.eobData = {};
8484
process.stdout.write(ERR_QUERY_EOB + '\n');
85-
process.stdout.write("Exception: " + e + '\n');
85+
process.stderr.write("Exception: " + String(e) + '\n');
8686
}
8787
} else {
8888
clearBB2Data();
8989
process.stdout.write(ERR_MISSING_AUTH_CODE + '\n');
9090
process.stdout.write("OR" + '\n');
9191
process.stdout.write(ERR_MISSING_STATE + '\n');
92-
process.stdout.write("AUTH CODE: " + req.query.code + '\n');
93-
process.stdout.write("STATE: " + req.query.state + '\n');
92+
process.stdout.write("AUTH CODE: " + JSON.stringify(req.query.code) + '\n');
93+
process.stdout.write("STATE: " + JSON.stringify(req.query.state) + '\n');
9494
}
9595
}
9696
const fe_redirect_url =
@@ -110,12 +110,12 @@ function loadDataFile(dataset_name: string, resource_file_name: string): any {
110110
const filename = `./default_datasets/${dataset_name}/${resource_file_name}.json`
111111
const resource = fs.readFileSync(filename, 'utf-8')
112112

113-
try {
114-
return JSON.parse(resource);
115-
} catch (error) {
116-
process.stdout.write("Error parsing JSON:", error);
117-
return null
118-
}
113+
try {
114+
return JSON.parse(resource);
115+
} catch (error) {
116+
process.stderr.write("Error parsing JSON: " + String(error) + '\n');
117+
return null
118+
}
119119
}
120120

121121
// data flow: front end fetch eob

server/package.json

Lines changed: 8 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,54 +9,22 @@
99
"start": "node ./node_modules/.bin/ts-node -r tsconfig-paths/register .",
1010
"start:debug": "node --inspect=0.0.0.0:9229 ./node_modules/.bin/ts-node -r tsconfig-paths/register ."
1111
},
12-
"eslintConfig": {
13-
"parser": "@typescript-eslint/parser",
14-
"plugins": [
15-
"@typescript-eslint"
16-
],
17-
"extends": [
18-
"eslint:recommended",
19-
"plugin:@typescript-eslint/recommended",
20-
"plugin:@typescript-eslint/recommended-requiring-type-checking"
21-
],
22-
"parserOptions": {
23-
"project": "./tsconfig.json"
24-
},
25-
"rules": {
26-
"max-len": [
27-
"error",
28-
{
29-
"code": 100
30-
}
31-
],
32-
"no-console": 1,
33-
"no-extra-boolean-cast": 0,
34-
"@typescript-eslint/restrict-plus-operands": 0,
35-
"@typescript-eslint/explicit-module-boundary-types": 0,
36-
"@typescript-eslint/no-explicit-any": 0,
37-
"@typescript-eslint/no-floating-promises": 0,
38-
"@typescript-eslint/no-unsafe-member-access": 0,
39-
"@typescript-eslint/no-unsafe-assignment": 0,
40-
"@typescript-eslint/no-unsafe-call": 0
41-
}
42-
},
43-
"eslintIgnore": [
44-
"build.ts"
45-
],
12+
4613
"dependencies": {
4714
"@types/express": "^4.17.14",
48-
"cms-bluebutton-sdk": "^1.0.2",
15+
"cms-bluebutton-sdk": "file:./cms-bluebutton-sdk-1.0.4.tgz",
4916
"express": "^4.18.2",
5017
"ts-node": "^10.9.1",
5118
"typescript": "^4.9.3"
5219
},
5320
"devDependencies": {
54-
"@typescript-eslint/eslint-plugin": "^4.22.0",
55-
"@typescript-eslint/parser": "^4.22.0",
56-
"eslint": "^7.25.0",
21+
"@eslint/compat": "^1.4.0",
22+
"@typescript-eslint/eslint-plugin": "^8.44.1",
23+
"@typescript-eslint/parser": "^8.44.1",
24+
"eslint": "^9.36.0",
5725
"eslint-config-airbnb": "^19.0.4",
58-
"eslint-config-airbnb-typescript": "^16.1.0",
59-
"eslint-plugin-import": "^2.25.4",
26+
"eslint-config-airbnb-typescript": "^18.0.0",
27+
"eslint-plugin-import": "^2.32.0",
6028
"jest": "^29.3.1",
6129
"tsconfig-paths": "^4.1.0"
6230
}

0 commit comments

Comments
 (0)