Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ module.exports = {
plugins: ['react-refresh'],
rules: {
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
},
],
//add this back in
// 'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
'no-restricted-imports': [
Expand Down
4,428 changes: 1,616 additions & 2,812 deletions package-lock.json

Large diffs are not rendered by default.

19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
"publishConfig": {
"access": "public"
},
"overrides": {
"minimatch": "^10.2.2",
"tmp": "^0.2.5",
"glob": "^13.0.6"
},
"scripts": {
"dev": "vite build --watch",
"build": "tsc && vite build && npm run logBuildDate",
Expand Down Expand Up @@ -74,15 +79,15 @@
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"@typescript-eslint/eslint-plugin": "^8.56.1",
"@typescript-eslint/parser": "^8.56.1",
"@vitejs/plugin-react": "^4.3.1",
"colors": "^1.4.0",
"commander": "^14.0.0",
"commitizen": "^4.3.1",
"cz-conventional-changelog": "^3.3.0",
"esbuild": "^0.27.2",
"eslint": "^8.57.0",
"esbuild": "^0.27.3",
"eslint": "^8.57.1",
"eslint-config-mx": "^4.0.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-react": "^7.35.0",
Expand All @@ -94,10 +99,10 @@
"markdown-eslint-parser": "^1.2.1",
"prettier": "3.7.4",
"rollup": "^4.21.0",
"semantic-release": "^24.2.3",
"semantic-release": "^25.0.3",
"typescript": "^5.2.2",
"typescript-eslint": "^8.2.0",
"vite": "^5.3.4",
"typescript-eslint": "^8.56.1",
"vite": "^7.3.1",
"vite-plugin-svgr": "^4.2.0",
"vitest": "^3.1.4"
},
Expand Down
4 changes: 2 additions & 2 deletions scripts/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const i18nExtract = () => {
logInfo(colors.magenta.bold(`Inserting current location info for ${locale}:`))
execUpdateLocations(locale)
})
} catch (err) {
} catch (_err) {
logError(`${colors.bold('ERROR:')} Error extracting strings`)
logInfo(`Make sure gettext is installed:\n
- https://ftp.gnu.org/pub/gnu/gettext/gettext-0.20.2.tar.gz`)
Expand Down Expand Up @@ -96,7 +96,7 @@ const po2json = () => {
.map((locale) => ` - ${LANG_FILE_DIRECTORY}/${locale}.json\n`)
.join('')}`,
)
} catch (err) {
} catch (_err) {
logError(`${colors.bold('ERROR:')} Error converting .po to .json`)
}
}
Expand Down
8 changes: 6 additions & 2 deletions src/components/__tests__/DayOfMonthPicker-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import { screen, render, waitFor } from 'src/utilities/testingLibrary'

import { DayOfMonthPicker } from 'src/components/DayOfMonthPicker'

vi.mock('src/utilities/Animation', () => ({
fadeOut: vi.fn(() => Promise.resolve()),
}))

const handleClose = vi.fn()
const handleSelect = vi.fn()

Expand All @@ -22,7 +26,7 @@ describe('DayOfMonthPicker', () => {
screen.getByText('Choose what day of the month your payment is due.'),
).toBeInTheDocument()
await user.click(screen.getByTestId('date-picker-button-4'))
waitFor(() => {
await waitFor(() => {
expect(handleSelect).toHaveBeenCalled()
})
})
Expand All @@ -31,7 +35,7 @@ describe('DayOfMonthPicker', () => {
const { user } = render(<DayOfMonthPicker {...dayOfMonthPickerProps} />)

await user.click(screen.getByTestId('back-button'))
waitFor(() => {
await waitFor(() => {
expect(handleClose).toHaveBeenCalled()
})
})
Expand Down
2 changes: 1 addition & 1 deletion src/redux/reducers/__tests__/config-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ describe('configSlice', () => {
const initialConfig = selectInitialConfig({ config: afterState })

// Remove _initialValues from the current state to compare the rest of the state
// eslint-disable-next-line @typescript-eslint/no-unused-vars

const { _initialValues, ...stateWithoutInitialValuesKey } = afterState
expect(initialConfig).toEqual(stateWithoutInitialValuesKey)
})
Expand Down
7 changes: 3 additions & 4 deletions src/redux/reducers/configSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ const configSlice = createSlice({
name: 'config',
initialState,
reducers: {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
addVerificationData: (state, _) => {
// If the current mode is AGG_MODE, we need to set the include_transactions flag to true
// in order to continue getting transactions for new connections
Expand All @@ -60,7 +59,7 @@ const configSlice = createSlice({
state.use_cases = ['MONEY_MOVEMENT']
}
},
// eslint-disable-next-line @typescript-eslint/no-unused-vars

addAggregationData: (state, _) => {
state.include_transactions = true

Expand Down Expand Up @@ -95,7 +94,7 @@ const configSlice = createSlice({
}

// Remove _initialValues from the state temporarily, create it below
// eslint-disable-next-line @typescript-eslint/no-unused-vars

const { _initialValues, ...stateWithoutInitialValues } = loadedState

return {
Expand Down Expand Up @@ -227,7 +226,7 @@ const getProductDeterminedMode = (config: {
const convertInitialValuesToObject = (initialValues: string) => {
try {
return JSON.parse(initialValues)
} catch (error) {
} catch (_error) {
// While the widget is loading, _initialValues may not be set yet
return {}
}
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/PostMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function sendPostMessage(event, data, scheme = 'mx') {
if (window.opener) {
window.opener.postMessage(message, postUrl)
}
} catch (error) {
} catch (_error) {
// This will quiet the noise in the console, while hopefully removing the error from honeybadger
// console.warn('Post message error', error)
}
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const urlWithHttps = (url) => {

// Return a string containing the whole url
return newUrl.toString()
} catch (error) {
} catch (_error) {
// Handles the case where the url is not a valid url(www.mx.com)
return `https://${url}`
}
Expand Down
6 changes: 6 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ export default defineConfig({
react: 'React',
'react-dom': 'ReactDOM',
},
assetFileNames: (assetInfo) => {
if (assetInfo.name && assetInfo.name.endsWith('.css')) {
return 'style.css'
Comment thread
ash-wright123 marked this conversation as resolved.
}
return assetInfo.name || 'assets/[name][extname]'
},
},
onwarn(warning, defaultHandler) {
if (warning.code === 'SOURCEMAP_ERROR') {
Expand Down
Loading