Skip to content

Commit

Permalink
chore(project): maintenance 2024-q1
Browse files Browse the repository at this point in the history
  • Loading branch information
MelissaDTH authored Mar 11, 2024
1 parent 42fdcad commit 08307d0
Show file tree
Hide file tree
Showing 24 changed files with 2,010 additions and 1,901 deletions.
3 changes: 2 additions & 1 deletion .syncpackrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"codeceptjs",
"codeceptjs**",
"react-router",
"react-router-dom"
"react-router-dom",
"typescript"
],
"packages": [
"**"
Expand Down
4 changes: 2 additions & 2 deletions configs/eslint-config-jwp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"test": "exit 0"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.17.0",
"@typescript-eslint/parser": "^5.17.0",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"confusing-browser-globals": "^1.0.10",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-react": "^7.24.0",
Expand Down
4 changes: 0 additions & 4 deletions configs/eslint-config-jwp/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ module.exports = {
{
files: ['*.ts', '*.tsx'],
rules: {
// TypeScript 4.0 adds 'any' or 'unknown' type annotation on catch clause variables.
// We need to make sure error is of the type we are expecting
'@typescript-eslint/no-implicit-any-catch': 'error',

// These are handled by TS
'@typescript-eslint/no-explicit-any': ['warn', { ignoreRestArgs: true }],
'@typescript-eslint/explicit-module-boundary-types': 'off',
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@
"@types/node": "^18.15.3",
"csv-parse": "^5.4.0",
"depcheck": "^1.4.3",
"eslint": "^7.31.0",
"eslint": "^8.57.0",
"husky": "^6.0.0",
"i18next-parser": "^8.0.0",
"lint-staged": "^15.1.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.8.8",
"read": "^2.1.0",
"ts-node": "^10.9.1",
"typescript": "^4.3.4",
"vitest": "^0.34.6"
"typescript": "5.3.3",
"vitest": "^1.3.1"
},
"peerDependencies": {
"eslint-config-jwp": "*"
Expand All @@ -59,7 +59,6 @@
"codeceptjs/**/minimatch": "^3.0.5",
"flat": "^5.0.1",
"glob-parent": "^5.1.2",
"json5": "^2.2.2",
"vite": "^4.4.8"
"json5": "^2.2.2"
}
}
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"jsdom": "^22.1.0",
"timezone-mock": "^1.3.4",
"vi-fetch": "^0.8.0",
"vitest": "^0.34.6"
"vitest": "^1.3.1"
},
"peerDependencies": {
"@jwp/ott-testing": "*",
Expand Down
2 changes: 1 addition & 1 deletion packages/hooks-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@testing-library/react": "^14.0.0",
"@types/jwplayer": "^8.2.13",
"vi-fetch": "^0.8.0",
"vitest": "^0.34.6"
"vitest": "^1.3.1"
},
"peerDependencies": {
"@jwp/ott-common": "*",
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"typescript-plugin-css-modules": "^5.0.2",
"vi-fetch": "^0.8.0",
"vite-plugin-svgr": "^4.2.0",
"vitest": "^0.34.6"
"vitest": "^1.3.1"
},
"peerDependencies": {
"@jwp/ott-common": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`<Button> > renders and matches snapshot 1`] = `
<div>
<button
class="_button_f8f296 _default_f8f296 _outlined_f8f296 _active_f8f296 "
class="_button_f8f296 _default_f8f296 _outlined_f8f296 _active_f8f296"
type="button"
>
<span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ exports[`<CheckoutForm> > renders and matches snapshot 1`] = `
class="_input_e16c1b"
id="text-field_1235_cardnumber"
name="cardNumber"
pattern="\\\\d*"
pattern="\\d*"
placeholder="1234 5678 9012 3456"
required=""
type="text"
Expand Down Expand Up @@ -163,7 +163,7 @@ exports[`<CheckoutForm> > renders and matches snapshot 1`] = `
class="_input_e16c1b"
id="text-field_1235_cardexpiry"
name="cardExpiry"
pattern="\\\\d*"
pattern="\\d*"
placeholder="MM/YY"
required=""
type="text"
Expand Down Expand Up @@ -193,7 +193,7 @@ exports[`<CheckoutForm> > renders and matches snapshot 1`] = `
class="_input_e16c1b"
id="text-field_1235_cardcvc"
name="cardCVC"
pattern="\\\\d*"
pattern="\\d*"
placeholder="###"
required=""
type="text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ exports[`<CreditCardCVCField> > renders and matches snapshot 1`] = `
class="_input_e16c1b"
id="text-field_1235_cardcvc"
name="cardCVC"
pattern="\\\\d*"
pattern="\\d*"
placeholder="###"
required=""
type="text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`<CreditCardExpiryField> > renders and matches snapshot 1`] = `
class="_input_e16c1b"
id="text-field_1235_cardexpiry"
name="cardExpiry"
pattern="\\\\d*"
pattern="\\d*"
placeholder="MM/YY"
required=""
type="text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports[`<CreditCardNumberField> > renders and matches snapshot 1`] = `
class="_input_e16c1b"
id="text-field_1235_cardnumber"
name="cardNumber"
pattern="\\\\d*"
pattern="\\d*"
placeholder="1234 5678 9012 3456"
required=""
type="text"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ exports[`<SideBar /> > renders sideBar closed 1`] = `
>
<a
aria-current="page"
class="_button_f8f296 _default_f8f296 _outlined_f8f296 _active_f8f296 "
class="_button_f8f296 _default_f8f296 _outlined_f8f296 _active_f8f296"
href="/"
>
<span>
Expand Down Expand Up @@ -91,7 +91,7 @@ exports[`<SideBar /> > renders sideBar opened 1`] = `
>
<a
aria-current="page"
class="_button_f8f296 _default_f8f296 _outlined_f8f296 _active_f8f296 "
class="_button_f8f296 _default_f8f296 _outlined_f8f296 _active_f8f296"
href="/"
>
<span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`User Component tests > Account Page 1`] = `
<li>
<a
aria-current="page"
class="_button_f8f296 _button_e9c5ca _default_f8f296 _text_f8f296 _active_f8f296 "
class="_button_f8f296 _button_e9c5ca _default_f8f296 _text_f8f296 _active_f8f296"
href="/u/my-account"
>
<div
Expand Down Expand Up @@ -312,7 +312,7 @@ exports[`User Component tests > Favorites Page 1`] = `
<li>
<a
aria-current="page"
class="_button_f8f296 _button_e9c5ca _default_f8f296 _text_f8f296 _active_f8f296 "
class="_button_f8f296 _button_e9c5ca _default_f8f296 _text_f8f296 _active_f8f296"
href="/u/favorites"
>
<div
Expand Down Expand Up @@ -591,7 +591,7 @@ exports[`User Component tests > Payments Page 1`] = `
<li>
<a
aria-current="page"
class="_button_f8f296 _button_e9c5ca _default_f8f296 _text_f8f296 _active_f8f296 "
class="_button_f8f296 _button_e9c5ca _default_f8f296 _text_f8f296 _active_f8f296"
href="/u/payments"
>
<div
Expand Down
6 changes: 6 additions & 0 deletions platforms/web/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
extends: ['jwp/react'],
env: {
node: true, // Enables recognition of Node.js global variables and scoping rules
},
};
3 changes: 0 additions & 3 deletions platforms/web/.eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion platforms/web/lighthouserc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
ci: {
collect: {
numberOfRuns: 3,
Expand Down
14 changes: 7 additions & 7 deletions platforms/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"build": "vite build --mode ${MODE:=prod} && sh scripts/compressIni.sh build/public/.webapp.ini",
"codecept-serve:desktop": "yarn codecept:desktop ; yarn serve-report:desktop",
"codecept-serve:mobile": "yarn codecept:mobile ; yarn serve-report:mobile",
"codecept:desktop": "cd test-e2e && rm -rf \"./output/desktop\" && codeceptjs run-workers --suites ${WORKER_COUNT:=8} --config ./codecept.desktop.js",
"codecept:mobile": "cd test-e2e && rm -rf \"./output/mobile\" && codeceptjs run-workers --suites ${WORKER_COUNT:=8} --config ./codecept.mobile.js",
"codecept:desktop": "cd test-e2e && rm -rf \"./output/desktop\" && codeceptjs run-workers --suites ${WORKER_COUNT:=8} --config ./codecept.desktop.cjs",
"codecept:mobile": "cd test-e2e && rm -rf \"./output/mobile\" && codeceptjs run-workers --suites ${WORKER_COUNT:=8} --config ./codecept.mobile.cjs",
"generate-pwa-assets": "pwa-assets-generator",
"lint:ts": "tsc --pretty --noEmit -p ./ && tsc --pretty --noEmit -p ./test-e2e",
"load-content-types": "npx ts-node ./scripts/content-types/load-content-types",
Expand Down Expand Up @@ -70,14 +70,14 @@
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.1.0",
"vi-fetch": "^0.8.0",
"vite": "^4.4.8",
"vite": "^5.1.5",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-html": "^3.2.0",
"vite-plugin-pwa": "^0.14.0",
"vite-plugin-html": "^3.2.2",
"vite-plugin-pwa": "^0.19.2",
"vite-plugin-static-copy": "^0.17.0",
"vite-plugin-stylelint": "^4.3.0",
"vite-plugin-stylelint": "^5.3.1",
"vite-plugin-svgr": "^4.2.0",
"vitest": "^0.34.6",
"vitest": "^1.3.1",
"workbox-build": "^6.5.4",
"workbox-window": "^6.5.4"
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions platforms/web/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,10 @@ export default ({ mode, command }: ConfigEnv): UserConfigExport => {
setupFiles: ['test/vitest.setup.ts'],
css: true,
},
optimizeDeps: {
esbuildOptions: {
tsconfig: 'tsconfig.json',
},
},
});
};
2 changes: 1 addition & 1 deletion tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"importsNotUsedAsValues": "error",
"verbatimModuleSyntax": false,
// Ensure unused code is cleaned up
"noUnusedParameters": true,
"noUnusedLocals": true,
Expand Down
Loading

0 comments on commit 08307d0

Please sign in to comment.