Skip to content

Commit 3b6f0c2

Browse files
chore: run 'npm lint:fix'
1 parent 1e95f39 commit 3b6f0c2

1,156 files changed

Lines changed: 18053 additions & 13014 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/pull_request_template.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ Design decisions and their rationales should be documented in the repo (docstrin
55
[OEP-19](https://open-edx-proposals.readthedocs.io/en/latest/oep-0019-bp-developer-documentation.html), and can be linked here.
66

77
Useful information to include:
8+
89
- Which user roles will this change impact? Common user roles are "Learner", "Course Author",
9-
"Developer", and "Operator".
10+
"Developer", and "Operator".
1011
- Include screenshots for changes to the UI (ideally, both "before" and "after" screenshots, if applicable).
1112

1213
## Supporting information
@@ -21,6 +22,7 @@ Please provide detailed step-by-step instructions for manually testing this chan
2122
## Other information
2223

2324
Include anything else that will help reviewers and consumers understand the change.
25+
2426
- Does this change depend on other changes elsewhere?
2527
- Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.
2628

.oxlintrc.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"rules": {
88
"eslint/no-unused-vars": ["warn", {
99
// Allow using {ignoredProp, ...keepTheRest} to omit a prop like 'ignoredProp' from an object.
10-
"ignoreRestSiblings": true,
10+
"ignoreRestSiblings": true
1111
}],
1212
// We disable exhaustive-deps because: it's noisy, and we often include extra deps when we want a memoized thing to
1313
// re-calculate after some change, even if we're not using that thing in the calculation.
@@ -21,11 +21,11 @@
2121
// complete, but we rarely if ever want that; we usually want to
2222
// continue invalidating more things immediately. So we don't usually
2323
// want to await this.
24-
"invalidateQueries",
24+
"invalidateQueries"
2525
]
2626
}]
2727
},
2828
"ignorePatterns": [
29-
"webpack.dev-tutor.config.js",
29+
"webpack.dev-tutor.config.js"
3030
]
31-
}
31+
}
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"name": "@openedx-plugins/course-app-calculator",
3-
"version": "0.1.0",
4-
"description": "Calculator configuration for courses using it",
5-
"peerDependencies": {
6-
"@edx/frontend-app-authoring": "*",
7-
"@edx/frontend-platform": "*",
8-
"@openedx/paragon": "*",
9-
"prop-types": "*",
10-
"react": "*"
11-
},
12-
"peerDependenciesMeta": {
13-
"@edx/frontend-app-authoring": {
14-
"optional": true
15-
}
2+
"name": "@openedx-plugins/course-app-calculator",
3+
"version": "0.1.0",
4+
"description": "Calculator configuration for courses using it",
5+
"peerDependencies": {
6+
"@edx/frontend-app-authoring": "*",
7+
"@edx/frontend-platform": "*",
8+
"@openedx/paragon": "*",
9+
"prop-types": "*",
10+
"react": "*"
11+
},
12+
"peerDependenciesMeta": {
13+
"@edx/frontend-app-authoring": {
14+
"optional": true
1615
}
16+
}
1717
}
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"name": "@openedx-plugins/course-app-dates",
3-
"version": "0.1.0",
4-
"description": "Dates configuration for courses using it",
5-
"peerDependencies": {
6-
"@edx/frontend-app-authoring": "*",
7-
"@edx/frontend-platform": "*",
8-
"@openedx/paragon": "*",
9-
"prop-types": "*",
10-
"react": "*"
11-
},
12-
"peerDependenciesMeta": {
13-
"@edx/frontend-app-authoring": {
14-
"optional": true
15-
}
2+
"name": "@openedx-plugins/course-app-dates",
3+
"version": "0.1.0",
4+
"description": "Dates configuration for courses using it",
5+
"peerDependencies": {
6+
"@edx/frontend-app-authoring": "*",
7+
"@edx/frontend-platform": "*",
8+
"@openedx/paragon": "*",
9+
"prop-types": "*",
10+
"react": "*"
11+
},
12+
"peerDependenciesMeta": {
13+
"@edx/frontend-app-authoring": {
14+
"optional": true
1615
}
16+
}
1717
}
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"name": "@openedx-plugins/course-app-edxnotes",
3-
"version": "0.1.0",
4-
"description": "edxnotes configuration for courses using it",
5-
"peerDependencies": {
6-
"@edx/frontend-app-authoring": "*",
7-
"@edx/frontend-platform": "*",
8-
"@openedx/paragon": "*",
9-
"prop-types": "*",
10-
"react": "*"
11-
},
12-
"peerDependenciesMeta": {
13-
"@edx/frontend-app-authoring": {
14-
"optional": true
15-
}
2+
"name": "@openedx-plugins/course-app-edxnotes",
3+
"version": "0.1.0",
4+
"description": "edxnotes configuration for courses using it",
5+
"peerDependencies": {
6+
"@edx/frontend-app-authoring": "*",
7+
"@edx/frontend-platform": "*",
8+
"@openedx/paragon": "*",
9+
"prop-types": "*",
10+
"react": "*"
11+
},
12+
"peerDependenciesMeta": {
13+
"@edx/frontend-app-authoring": {
14+
"optional": true
1615
}
16+
}
1717
}

plugins/course-apps/learning_assistant/Settings.jsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const LearningAssistantSettings = ({ onClose }) => {
1515
const intl = useIntl();
1616

1717
// We need to render more than one link, so we use the bodyChildren prop.
18-
const bodyChildren = (
18+
const bodyChildren =
1919
appInfo?.documentationLinks?.learnMoreOpenaiDataPrivacy && appInfo?.documentationLinks?.learnMoreOpenai
2020
? (
2121
<div className="d-flex flex-column">
@@ -41,8 +41,7 @@ const LearningAssistantSettings = ({ onClose }) => {
4141
)}
4242
</div>
4343
)
44-
: null
45-
);
44+
: null;
4645

4746
return (
4847
<AppSettingsModal

plugins/course-apps/learning_assistant/Settings.test.jsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ import { RequestStatus } from 'CourseAuthoring/data/constants';
55
import { initializeMocks, render } from 'CourseAuthoring/testUtils';
66
import LearningAssistantSettings from './Settings';
77

8-
const onClose = () => { };
8+
const onClose = () => {};
99

1010
describe('Learning Assistant Settings', () => {
1111
it('renders', async () => {
1212
const initialState = {
1313
models: {
1414
courseApps: {
15-
learning_assistant:
16-
{
15+
learning_assistant: {
1716
id: 'learning_assistant',
1817
enabled: true,
1918
name: 'Learning Assistant',
@@ -38,10 +37,12 @@ describe('Learning Assistant Settings', () => {
3837
render(<LearningAssistantSettings onClose={onClose} />);
3938

4039
const toggleDescription = 'Reinforce learning concepts by sharing text-based course content '
41-
+ 'with OpenAI (via API) to power an in-course Learning Assistant. Learners can leave feedback about the quality '
42-
+ 'of the AI-powered experience for use by edX to improve the performance of the tool.';
40+
+ 'with OpenAI (via API) to power an in-course Learning Assistant. Learners can leave feedback about the quality '
41+
+ 'of the AI-powered experience for use by edX to improve the performance of the tool.';
4342

44-
await waitFor(() => expect(screen.getByRole('heading', { name: 'Configure Learning Assistant' })).toBeInTheDocument());
43+
await waitFor(() =>
44+
expect(screen.getByRole('heading', { name: 'Configure Learning Assistant' })).toBeInTheDocument()
45+
);
4546
await waitFor(() => expect(screen.getByText(toggleDescription)).toBeInTheDocument());
4647
await waitFor(() => expect(screen.getByText('Learn more about how OpenAI handles data')).toBeInTheDocument());
4748
await waitFor(() => expect(screen.getByText('Learn more about OpenAI API data privacy')).toBeInTheDocument());
Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
{
2-
"name": "@openedx-plugins/course-app-learning_assistant",
3-
"version": "0.1.0",
4-
"description": "Learning Assistant configuration for courses using it",
5-
"peerDependencies": {
6-
"@edx/frontend-app-authoring": "*",
7-
"@edx/frontend-platform": "*",
8-
"@openedx/paragon": "*",
9-
"prop-types": "*",
10-
"react": "*",
11-
"yup": "*"
12-
},
13-
"peerDependenciesMeta": {
14-
"@edx/frontend-app-authoring": {
15-
"optional": true
16-
}
2+
"name": "@openedx-plugins/course-app-learning_assistant",
3+
"version": "0.1.0",
4+
"description": "Learning Assistant configuration for courses using it",
5+
"peerDependencies": {
6+
"@edx/frontend-app-authoring": "*",
7+
"@edx/frontend-platform": "*",
8+
"@openedx/paragon": "*",
9+
"prop-types": "*",
10+
"react": "*",
11+
"yup": "*"
12+
},
13+
"peerDependenciesMeta": {
14+
"@edx/frontend-app-authoring": {
15+
"optional": true
1716
}
17+
}
1818
}
19-

plugins/course-apps/live/BBBSettings.jsx

Lines changed: 37 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,17 @@ const BbbSettings = ({
4242
};
4343
return (
4444
<>
45-
{isPiiDisabled ? (
46-
<p data-testid="request-pii-sharing">
47-
{intl.formatMessage(messages.requestPiiSharingEnableForBbb, { provider: providerNames[values.provider] })}
48-
</p>
49-
) : (
50-
<p data-testid="helper-text">
51-
{intl.formatMessage(messages.providerHelperText, { providerName: providerNames[values.provider] })}
52-
</p>
53-
)}
45+
{isPiiDisabled ?
46+
(
47+
<p data-testid="request-pii-sharing">
48+
{intl.formatMessage(messages.requestPiiSharingEnableForBbb, { provider: providerNames[values.provider] })}
49+
</p>
50+
) :
51+
(
52+
<p data-testid="helper-text">
53+
{intl.formatMessage(messages.providerHelperText, { providerName: providerNames[values.provider] })}
54+
</p>
55+
)}
5456

5557
<Form.Group controlId="bbs-settings" data-testid="plansDropDown">
5658
<Form.Label as="planSelector" className="h6">
@@ -78,33 +80,35 @@ const BbbSettings = ({
7880
showLaunchIcon
7981
className="text-primary-500 pt-2"
8082
>
81-
{ intl.formatMessage(messages.learnMore, { providerName: 'plans' }) }
83+
{intl.formatMessage(messages.learnMore, { providerName: 'plans' })}
8284
</Hyperlink>
8385
<>
8486
<AppConfigFormDivider thick marginAdj={{ default: 0, sm: 2 }} />
85-
{isPiiDisabled ? (
86-
<p data-testid="help-request-pii-sharing">
87-
{intl.formatMessage(messages.piiSharingEnableHelpTextBbb)}
88-
</p>
89-
) : (
90-
<>
91-
{bbbPlan === bbbPlanTypes.commercial && <LiveCommonFields values={values} />}
92-
{bbbPlan === bbbPlanTypes.free && (
93-
<span data-testid="free-plan-message">
94-
{intl.formatMessage(messages.freePlanMessage)}
95-
<Hyperlink
96-
destination={getExternalLinkUrl('https://bigbluebutton.org/privacy-policy/')}
97-
target="_blank"
98-
rel="noopener noreferrer"
99-
showLaunchIcon
100-
className="text-gray-700 ml-1"
101-
>
102-
{intl.formatMessage(messages.privacyPolicy)}
103-
</Hyperlink>
104-
</span>
105-
)}
106-
</>
107-
)}
87+
{isPiiDisabled ?
88+
(
89+
<p data-testid="help-request-pii-sharing">
90+
{intl.formatMessage(messages.piiSharingEnableHelpTextBbb)}
91+
</p>
92+
) :
93+
(
94+
<>
95+
{bbbPlan === bbbPlanTypes.commercial && <LiveCommonFields values={values} />}
96+
{bbbPlan === bbbPlanTypes.free && (
97+
<span data-testid="free-plan-message">
98+
{intl.formatMessage(messages.freePlanMessage)}
99+
<Hyperlink
100+
destination={getExternalLinkUrl('https://bigbluebutton.org/privacy-policy/')}
101+
target="_blank"
102+
rel="noopener noreferrer"
103+
showLaunchIcon
104+
className="text-gray-700 ml-1"
105+
>
106+
{intl.formatMessage(messages.privacyPolicy)}
107+
</Hyperlink>
108+
</span>
109+
)}
110+
</>
111+
)}
108112
</>
109113
</>
110114
);

plugins/course-apps/live/BbbSettings.test.jsx

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,14 @@ const mockStore = async ({
6363
const fetchProviderConfigUrl = `${providersApiUrl}/${courseId}/`;
6464
const fetchLiveConfigUrl = `${providerConfigurationApiUrl}/${courseId}/`;
6565

66-
axiosMock.onGet(fetchProviderConfigUrl).reply(200, configurationProviders(emailSharing, usernameSharing, 'big_blue_button', isFreeTier));
67-
axiosMock.onGet(fetchLiveConfigUrl).reply(200, generateLiveConfigurationApiResponse(enabled, piiSharingAllowed, 'bigBlueButton', isFreeTier));
66+
axiosMock.onGet(fetchProviderConfigUrl).reply(
67+
200,
68+
configurationProviders(emailSharing, usernameSharing, 'big_blue_button', isFreeTier),
69+
);
70+
axiosMock.onGet(fetchLiveConfigUrl).reply(
71+
200,
72+
generateLiveConfigurationApiResponse(enabled, piiSharingAllowed, 'bigBlueButton', isFreeTier),
73+
);
6874

6975
await executeThunk(fetchLiveProviders(courseId), store.dispatch);
7076
await executeThunk(fetchLiveConfiguration(courseId), store.dispatch);
@@ -88,14 +94,17 @@ describe('BBB Settings', () => {
8894
expect(container.querySelector('select[name="tierType"]')).not.toBeDisabled();
8995
});
9096

91-
test.each([[true, 3], [false, 2]])('Plan dropdown should display correct number of options', async (isFreeTier, noOfOptions) => {
92-
await mockStore({ emailSharing: true, isFreeTier });
93-
renderComponent();
94-
const spinner = getByRole(container, 'status');
95-
await waitForElementToBeRemoved(spinner);
96-
const dropDown = queryByTestId(container, 'plansDropDown');
97-
expect(getAllByRole(dropDown, 'option').length).toBe(noOfOptions);
98-
});
97+
test.each([[true, 3], [false, 2]])(
98+
'Plan dropdown should display correct number of options',
99+
async (isFreeTier, noOfOptions) => {
100+
await mockStore({ emailSharing: true, isFreeTier });
101+
renderComponent();
102+
const spinner = getByRole(container, 'status');
103+
await waitForElementToBeRemoved(spinner);
104+
const dropDown = queryByTestId(container, 'plansDropDown');
105+
expect(getAllByRole(dropDown, 'option').length).toBe(noOfOptions);
106+
},
107+
);
99108

100109
test(
101110
'Connect to support and PII sharing message is visible and plans selection is disabled, When pii sharing is disabled, ',

0 commit comments

Comments
 (0)