* Mild style whitespace linting * Updating to latest paragon and brand. Needed to update Button/StatefulButton props to use variant, primarily. * Adding new environment variables. * Fixing prop-types warning. * Updating snapshots. Modal and Button changed primarily. I’ve reviewed the various snapshots and determined they’re all correct. The button prop changes are in line with what I’ve seen elsewhere with the new react-bootstrap-based Button component replacing our own button. The modal changes make sense, as I think we added some focus lock handling. * Locking dependency versions in package.json * Removing dataUtils functions, extraneous deps, and updating frontend-build Committing all these at the same time since they affect package-lock.json together and splitting them out is nearly impossible now. * Turning the linter on. Hold on to your butts! After this commit, there will be ~1600 linting errors to fix in subsequent commits. * Main app auto-linting. Not including coaching, demographics, or ID verification. This is all the whitespace/syntax linting that my auto-formatter fixed. I did a few small whitespace cleanups after it, but this commit is 95% automatic. * Removing HeaderFooterLayout The HeaderFooterLayout was only used in one place. Collapsing it down again; also means we don’t have to have prop types for it or split it out into a separate file or anything. * Main app propTypes cleanup We were missing some propTypes in AccountSettingsPage and EditableField. JumpNav had a default that was unused, since displayDemographicsLink is Required. * Main app manual linting AccountSettingsPage had some function-ordering issues, and some weak equality checking. EditableField had an if without curly braces, followed by a variable named “value” which obscured a variable with the same name in the parent scope. I renamed it to “finalValue” to avoid the name reuse. * Coaching auto-fixed lint errors These are general whitespace and syntax linting errors that my IDE automatically fixed. I went in after and tweaked the whitespace a bit cause it didn’t finish the job, but this is 95% automatic. * Coaching unused prop in CoachingConsent. * Demographics auto-fixed lint errors. Again, 95% auto-fixed linting errors, done by my IDE. I tweaked a few here and there for spacing and such where it didn’t do a perfecto job. * Demographics Checkboxes manual linting fixes. A few things here: - We were double-exporting Checkboxes, once as the default, once as a named export. I removed the named export. - Now uses === when checking string equality. - id prop was always set, so I made it required - PropTypes.array is not specific enough for the linter, so I found out what “values” and “options” were being set to and made some arrayOf PropTypes declarations that were more specific. - onChange is also always set, so now it’s required. * Demographics manual linting fixes for DemographicsSection Bunch of things here: - Reordered hasRetrievedDemographicsOptions and addDefaultOption to later in the file where the linter told me to put them. - ethnicityFieldDisplay did not consistently return - only in the conditional did it return. Now it uses the conditional to set a value for enthicities and then consistently returns at the end, processing the ethnicities array. - handleSubmit didn’t use its “values” prop - handleSubmit was iterating over an object using a for…in loop, which iterates over ALL properties of an object, not just the keys you might expect. Probably not a problem, but not a good practice either. It now uses Object.entries to get the iterable properties of the object. - renderDemographicsServiceIssueWarning should use a || instead of a | for an OR. It can also use ! instead of == false - Using === for string equality in showSelfDescribe and showWorkStatusDescribe - Using the Paragon Hyperlink component instead of an a tag. It decorates links with additional metadata noting that the link will be external. - Adding rel=“noopener noreferrer”, which is a security fix. - Adding missing propTypes for formValues, drafts, forwardRef, and saveMultipleSettings. * ID Verification auto-fixed linting errors This commit includes whitespace and syntax linting errors that were auto-fixed by my IDE, with a little manual whitespace fixing by me where it didn’t get it quite right. 95% automated. * ID Verification circular dependency between IdVerificationContext and AccessBlocked This commit resolves a circular dependencybetween IdVerificationContext and the AccessBlocked component. AccessBlocked imported ERROR_REASONS from IdVerificationContext and IdVerificationContext imported AccessBlocked itself. We resolve this by moving IdVerificationContextProvider out into its own file. Then it can safely import from AccessBlocked, and both can safely import the context and constants from IdVerificationContext. This also sets IdVerificationContext as the default export from its file, which is responsible for the majority of the file changes in this commit, where the import shape changed. * ID verification removing an unused import in SubmittedPanel * Ignoring @tensorflow-models/blazeface as an unresolved import We’re depending on an alias for @tensorflow-models/blazeface which confuses eslint. I’ve just told it to ignore the problem, since the code is valid. * ID Verification misc manual linting fixes There’s a number of things in this commit: - In Camera, we’re using the function version of setState so we can ensure we’re getting the right version of shouldDetect - you’re not supposed to set state from state directly, as there’s no guarantee that it’s still correct, and you might be setting it from stale data. - In Camera, the takePhoto function inconsistently returned a value. Returning after calling this.reset() makes it consistently return undefined. - In Camera, the <button> was missing a type. - In Camera, it’s also violating two accessibility rules - the video media has no caption, and there’s apparently not supposed to be an accessKey on buttons. I don’t know how to fix either of those for this code so I’m punting - I’m leaving it to the owning teams. - IdVerificationPage should be calling Object.prototype.hasOwnProperty instead of assuming a variable has Object prototype functions. - ImagePreview didn’t set a default prop value for the id prop - I’ve set it to undefined. - RequestCameraAccessPanel needed a button type on the “Enable” button. - RequestCameraAccessPanel should use === for string equality. * ID Verification manual linting fix to rearrange methods in Camera The linter complained about the order of methods in the Camera component. This commit rearranges them to suit it. * Ignoring module.config.js file. * Fixing package-lock.json after rebase.
26 lines
537 B
Bash
26 lines
537 B
Bash
ACCESS_TOKEN_COOKIE_NAME=null
|
|
BASE_URL=null
|
|
CREDENTIALS_BASE_URL=null
|
|
CSRF_TOKEN_API_PATH=null
|
|
ECOMMERCE_BASE_URL=null
|
|
LANGUAGE_PREFERENCE_COOKIE_NAME=null
|
|
LMS_BASE_URL=null
|
|
DEMOGRAPHICS_BASE_URL=null
|
|
LOGIN_URL=null
|
|
LOGOUT_URL=null
|
|
MARKETING_SITE_BASE_URL=null
|
|
NODE_ENV=null
|
|
ORDER_HISTORY_URL=null
|
|
REFRESH_ACCESS_TOKEN_ENDPOINT=null
|
|
SEGMENT_KEY=null
|
|
SITE_NAME=null
|
|
SUPPORT_URL=null
|
|
USER_INFO_COOKIE_NAME=null
|
|
LOGO_URL=''
|
|
LOGO_TRADEMARK_URL=''
|
|
LOGO_WHITE_URL=''
|
|
FAVICON_URL=''
|
|
PUBLISHER_BASE_URL=
|
|
STUDIO_BASE_URL=
|
|
DISCOVERY_API_BASE_URL=
|