* fix: fixing broken linter script and linting The linter script in package.json didn’t specify which files to lint, so it never linted anything. As soon as I fixed the script line, there was suddenly a ton of stuff that needed linting. This fixes the script and cleans up all the things that needed linting. The vast majority were formatting auto-fixes in VSCode for me. * fix: setting NODE_ENV to production in .env Without this change, the NODE_ENV comes through as “null” (a string!) in the app. This causes a number of third party dependencies like React and Redux to potentially go into development mode, slowing them down, or to not realize they’re in production mode, causing them to throw some warnings. * style: some additional linting * feat: upgrading to modern paragon and a brand package This commit updates the app from Paragon 7 to 12 and fixes the breaking changes in between. Mostly small changes to Button and Dropdown, as well as using “container” instead of “container-fluid” to preserve the page’s width as closely as possible. It also adds the brand package, which is why it’s a feature. Using the brand package allows the MFE to be rebranded by using an npm alias to override the source of the brand. * test: fixing test snapshots that failed when updating paragon The test snapshots got a bit out of date when updating paragon. Also removing an unncessary “type” from Dropdown.Toggle which does nothing. - container has been replaced by container-fluid - The Button component is a different implementation, which adds slightly different properties to the rendered button. i.e., onKeyDown and disabled, but doesn’t add the id or onBlur. - The Dropdown doesn’t render its contents until it’s opened, which is why “Upload Photo” and “Remove” are no longer in the snapshot. - * build: bumping paragon to 13 * fix: fixing broken test snapshot btn-outline is definitely not a correct button type. * fix: using the ‘size’ property on Button * fix: updating dependencies We needed to upgrade paragon to 13.1.2 to fix a transpilation issue that was causing ES6 code to be included in the build artifact. All other upgrades here were attempts at fixing that, but they’re all also perfectly valid and good to update, so I left them. babel-polyfill has been replaced by including core-js and regenerator-runtime. Upgrading frontend-build fixed an issue with eslint configuration that emerged during the other upgrades. * fix: switch back to container-fluid We want to leave it as container-fluid and solve the max width problem through paragon. * style: cleanup and formatting of SCSS Also removing an unnecessary variant of primary on a button. * test: fix broken snapshot test
8 lines
187 B
JavaScript
Executable File
8 lines
187 B
JavaScript
Executable File
import 'core-js/stable';
|
|
import 'regenerator-runtime/runtime';
|
|
|
|
import Enzyme from 'enzyme';
|
|
import Adapter from 'enzyme-adapter-react-16';
|
|
|
|
Enzyme.configure({ adapter: new Adapter() });
|