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

Fix existing eslint warnings, configure eslint to fail on warning #5258

Merged
merged 16 commits into from
May 26, 2022

Conversation

ozyx
Copy link
Contributor

@ozyx ozyx commented May 25, 2022

Closes #5231

Describe your changes:

Resolve all existing eslint warnings, and configure lint step to fail if it encounters > 0 warnings.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.

Author Checklist

  • Changes address original issue?
  • Unit tests included and/or updated with changes?
  • Command line build passes?
  • Has this been smoke tested?
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Changes appear not to be breaking changes?
  • Appropriate unit tests included?
  • Code style and in-line documentation are appropriate?
  • Commit messages meet standards?
  • Has associated issue been labelled unverified? (only applicable if this PR closes the issue)
  • Has associated issue been labelled bug? (only applicable if this PR is for a bug fix)

@codecov
Copy link

codecov bot commented May 25, 2022

Codecov Report

Merging #5258 (676eb9f) into master (c56d458) will decrease coverage by 0.23%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5258      +/-   ##
==========================================
- Coverage   50.21%   49.97%   -0.24%     
==========================================
  Files         548      548              
  Lines       20127    20127              
  Branches     1864     1864              
==========================================
- Hits        10106    10058      -48     
- Misses       9539     9588      +49     
+ Partials      482      481       -1     
Impacted Files Coverage Δ
src/plugins/imagery/components/ImageControls.vue 22.58% <ø> (ø)
...lugins/plot/overlayPlot/OverlayPlotViewProvider.js 14.28% <0.00%> (-78.58%) ⬇️
src/ui/inspector/InspectorViews.vue 64.28% <0.00%> (-28.58%) ⬇️
...ugins/plot/inspector/PlotsInspectorViewProvider.js 64.28% <0.00%> (-28.58%) ⬇️
...Conductor/independent/IndependentTimeConductor.vue 0.00% <0.00%> (-26.57%) ⬇️
src/plugins/plot/Plot.vue 38.46% <0.00%> (-23.08%) ⬇️
src/plugins/plot/inspector/PlotOptions.vue 80.00% <0.00%> (-20.00%) ⬇️
...c/plugins/goToOriginalAction/goToOriginalAction.js 92.85% <0.00%> (-7.15%) ⬇️
src/ui/inspector/ObjectName.vue 56.75% <0.00%> (-5.41%) ⬇️
src/ui/layout/BrowseBar.vue 44.82% <0.00%> (-4.60%) ⬇️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c56d458...676eb9f. Read the comment docs.

Copy link
Contributor

@unlikelyzero unlikelyzero left a comment

Choose a reason for hiding this comment

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

quick changes

@@ -82,7 +82,7 @@
"clean": "rm -rf ./dist ./node_modules ./package-lock.json",
"clean-test-lint": "npm run clean; npm install; npm run test; npm run lint",
"start": "node app.js",
"lint": "eslint example src e2e --ext .js,.vue openmct.js",
"lint": "eslint example src e2e --ext .js,.vue openmct.js --max-warnings=0",
Copy link
Contributor

Choose a reason for hiding this comment

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

woah

ozyx added 5 commits May 25, 2022 14:51
- Add exception and FIXME for timeout

- Add comment on fixme test to discourage community contribution
- remove unnecessary awaits

- update locators to use data-testid where possible

- remove unnecessary wait
// FIXME: This defaults to 5000 ms in execution, but there's a bug
// which causes the historical images to not populate for certain delay values.
// Update the value to 5000 ms when the bug is fixed.
// See: https://github.com/nasa/openmct/issues/5265
Copy link
Contributor

Choose a reason for hiding this comment

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

I would maybe add the testannotation for this github issue so that we can track it in the test reporting

await page.waitForTimeout(21);
let imageCount = await page.locator('.c-imagery__thumb').count();
try {
// Wait for at least one new image to stream in
Copy link
Contributor

Choose a reason for hiding this comment

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

We could also consider polling until true here https://playwright.dev/docs/test-assertions#polling

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes!! This is what I was looking for. Awesome.

@ozyx ozyx marked this pull request as ready for review May 26, 2022 16:42
@ozyx ozyx requested a review from unlikelyzero May 26, 2022 16:42
Copy link
Contributor

@unlikelyzero unlikelyzero left a comment

Choose a reason for hiding this comment

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

Great! We'll need to keep the async polling method in our minds for when we write the FAQ and recipe section of the e2e contribution guide

@unlikelyzero unlikelyzero merged commit 6c71fa0 into master May 26, 2022
@unlikelyzero unlikelyzero deleted the mct5231-fix-lint-warnings branch May 26, 2022 16:45
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.

Fix lint warnings and configure build to fail on lint warning
2 participants