Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] Include newest version of eslint-config-expensify with new rule of no-multiple-onyx-in-file #27840

1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ module.exports = {
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
rules: {
'rulesdir/onyx-props-must-have-default': 'off',
'rulesdir/no-multiple-onyx-in-file': 'error',
studentofcoding marked this conversation as resolved.
Show resolved Hide resolved
'react-native-a11y/has-accessibility-hint': ['off'],
'react-native-a11y/has-valid-accessibility-descriptors': [
'error',
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
"electron-builder": "24.6.4",
"eslint": "^7.6.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-expensify": "^2.0.38",
"eslint-config-expensify": "^2.0.39",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-jest": "^24.1.0",
"eslint-plugin-jsdoc": "^46.2.6",
Expand Down
2 changes: 2 additions & 0 deletions src/components/LHNOptionsList/OptionRowLHNData.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ export default React.memo(
key: ONYXKEYS.NVP_PREFERRED_LOCALE,
},
}),
// eslint-disable-next-line
withOnyx({
parentReportActions: {
key: ({fullReport}) => `${ONYXKEYS.COLLECTION.REPORT_ACTIONS}${fullReport.parentReportID}`,
Expand All @@ -209,6 +210,7 @@ export default React.memo(
// However, performance overhead of this is minimized by using memos inside the component.
receiptTransactions: {key: ONYXKEYS.COLLECTION.TRANSACTION},
}),
// eslint-disable-next-line
withOnyx({
transaction: {
key: ({fullReport, parentReportActions}) =>
Expand Down
1 change: 1 addition & 0 deletions src/pages/EditRequestPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ export default compose(
key: ({route}) => `${ONYXKEYS.COLLECTION.REPORT}${route.params.threadReportID}`,
},
}),
// eslint-disable-next-line
withOnyx({
parentReport: {
key: ({report}) => `${ONYXKEYS.COLLECTION.REPORT}${report ? report.parentReportID : '0'}`,
Expand Down
8 changes: 8 additions & 0 deletions src/pages/iou/MoneyRequestTagPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ export default compose(
key: ONYXKEYS.IOU,
},
}),
// eslint-disable-next-line
studentofcoding marked this conversation as resolved.
Show resolved Hide resolved
withOnyx({
studentofcoding marked this conversation as resolved.
Show resolved Hide resolved
report: {
// Fetch report ID from IOU participants if no report ID is set in route
key: ({route, iou}) => `${ONYXKEYS.COLLECTION.REPORT}${lodashGet(route, 'params.reportID', '') || lodashGet(iou, 'participants.0.reportID', '')}`,
},
}),
studentofcoding marked this conversation as resolved.
Show resolved Hide resolved
// eslint-disable-next-line
withOnyx({
policyTags: {
key: ({report}) => `${ONYXKEYS.COLLECTION.POLICY_TAGS}${report ? report.policyID : '0'}`,
Expand Down
2 changes: 2 additions & 0 deletions src/pages/iou/steps/MoneyRequestConfirmPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ export default compose(
key: ONYXKEYS.IOU,
},
}),
// eslint-disable-next-line
withOnyx({
report: {
key: ({route, iou}) => {
Expand All @@ -372,6 +373,7 @@ export default compose(
key: `${ONYXKEYS.COLLECTION.SELECTED_TAB}${CONST.TAB.RECEIPT_TAB_ID}`,
},
}),
// eslint-disable-next-line
withOnyx({
policy: {
key: ({report}) => `${ONYXKEYS.COLLECTION.POLICY}${report.policyID}`,
Expand Down
Loading