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

SIMSBIOHUB-32-2: Additional Tweaks to lint/format versions, import paths, tsconfig, etc. #1042

Merged
merged 8 commits into from
Jun 5, 2023

Conversation

NickPhura
Copy link
Collaborator

@NickPhura NickPhura commented Jun 5, 2023

Overview

Links to Jira tickets

  • {List all applicable Jira tickets}

Description of relevant changes

  • Update eslint/prettier/jest versions
    • Was getting some odd issues, this seemed to fix them.
  • Update tsconfig: 'react' -> 'react-jsx'
    • Remove unused React imports (which are now global when using 'react-jsx'
  • Update some material-ui import paths

PR Checklist

A list of items that are good to consider when making any changes.

Note: this list is not exhaustive, and not all items are always applicable.

Code

  • New files/classes/functions have appropriately descriptive names and comment blocks to describe their use/behaviour
  • I have avoided duplicating code when possible, moving re-usable pieces into functions
  • I have avoided hard-coding values where possible and moved any re-usable constants to a constants file
  • My code is as flat as possible (avoids deeply nested if/else blocks, promise chains, etc)
  • My code changes account for null/undefined values and handle errors appropriately
  • My code uses types/interfaces to help describe values/parameters/etc, help ensure type safety, and improve readability

Style

  • My code follows the established style conventions
  • My code uses native material-ui components/icons/conventions when possible

Documentation

  • I have commented my code sufficiently, such that an unfamiliar developer could understand my code
  • I have added/updated README's and related documentation, as needed

Tests

  • I have added/updated unit tests for any code I've added/updated
  • I have added/updated the Postman requests/tests to account for any API endpoints I've added/updated

Linting/Formatting

  • I have run the linter and fixed any issues, as needed
    See the lint commands in package.json
  • I have run the formatter and fixed any issues, as needed
    See the format commands in package.json

SonarCloud

  • I have addressed all SonarCloud Bugs, Vulnerabilities, Security Hotspots, and Code Smells

@NickPhura NickPhura changed the title SIMSBIOHUB-32-2: Additional Tweaks to lint/format versions, import paths, etc. SIMSBIOHUB-32-2: Additional Tweaks to lint/format versions, import paths, tsconfig, etc. Jun 5, 2023
@codecov
Copy link

codecov bot commented Jun 5, 2023

Codecov Report

Merging #1042 (c767592) into dev (e1c8b0e) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##              dev    #1042   +/-   ##
=======================================
  Coverage   67.67%   67.67%           
=======================================
  Files         392      392           
  Lines       12208    12208           
  Branches     2083     2083           
=======================================
  Hits         8262     8262           
  Misses       3433     3433           
  Partials      513      513           
Impacted Files Coverage Δ
...rc/components/attachments/list/AttachmentsList.tsx 78.26% <ø> (ø)
app/src/components/boundary/MapBoundary.tsx 50.00% <ø> (ø)
app/src/components/buttons/LoadingButton.tsx 100.00% <ø> (ø)
app/src/components/dialog/DialogVisual.tsx 0.00% <ø> (ø)
app/src/components/dialog/EditDialog.tsx 90.00% <ø> (ø)
app/src/components/dialog/SubmitBiohubDialog.tsx 43.33% <ø> (ø)
app/src/components/fields/CustomFieldArray.tsx 0.00% <ø> (ø)
app/src/components/fields/SelectWithSubtext.tsx 20.00% <0.00%> (ø)
...pp/src/components/funding-source/FundingSource.tsx 81.81% <ø> (ø)
app/src/components/map/DatasetPopup.tsx 8.33% <ø> (ø)
... and 56 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Remove more unused react imports.
@NickPhura
Copy link
Collaborator Author

I was getting some funny issues with the formatter and then jest, but version bumps seemed to fix them. But would definitely be best if someone could download and run it all locally to make sure its happy now (and I wasn't just getting some weird local issues).

@anissa-agahchen
Copy link
Contributor

@NickPhura this message is coming up in the app log:

One of your dependencies, babel-preset-react-app, is importing the
"@babel/plugin-proposal-private-property-in-object" package without
declaring it in its dependencies. This is currently working because
"@babel/plugin-proposal-private-property-in-object" is already in your
node_modules folder for unrelated reasons, but it may break at any time.

babel-preset-react-app is part of the create-react-app project, which
is not maintianed anymore. It is thus unlikely that this bug will ever
be fixed. If you are starting a new project, you may consider using
maintained alternatives such as Vite (https://vitejs.dev/) instead.

Add "@babel/plugin-proposal-private-property-in-object" to your
devDependencies to work around this error. This will make this message
go away.

al-rosenthal
al-rosenthal previously approved these changes Jun 5, 2023
Copy link
Contributor

@al-rosenthal al-rosenthal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked over the changes, things look good 🕶️

@NickPhura
Copy link
Collaborator Author

NickPhura commented Jun 5, 2023

Yeah I saw that. Its a bit of an odd message, Im pretty sure its one of those advertising messages, which is why its mentioning vite.

I was going to just look into a resolution for it separately, as its not a true warning.

curtisupshall
curtisupshall previously approved these changes Jun 5, 2023
Copy link
Contributor

@curtisupshall curtisupshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@NickPhura
Copy link
Collaborator Author

NickPhura commented Jun 5, 2023

Had to merge in latest dev, and there was a conflict in a package lock, so it reset reviews.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@al-rosenthal al-rosenthal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐋

@NickPhura NickPhura merged commit 9bcc2d2 into dev Jun 5, 2023
@NickPhura NickPhura deleted the SIMSBIOHUB-32-2 branch June 5, 2023 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants