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

chore: added eslint plugin import check on missing dependencies #4928

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Rajdeepc
Copy link
Contributor

@Rajdeepc Rajdeepc commented Nov 11, 2024

Description

Added eslint-plugin-import plugin to check for extraneous dependencies.

Related issue(s)

  • @spectrum-web-components/[email protected] importing lit in several places, but doesn’t depend on it and is missing lit as its direct dependencies causing compile errors

Motivation and context

How has this been tested?

  • Test case 1

    1. download the branch
    2. run yarn lint
  • Did it pass in Desktop?

  • Did it pass in Mobile?

  • Did it pass in iPad?

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (minor updates related to the tooling or maintenance of the repository, does not impact compiled assets)

Checklist

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • If my change required a change to the documentation, I have updated the documentation in this pull request.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices

Best practices

This repository uses conventional commit syntax for each commit message; note that the GitHub UI does not use this by default so be cautious when accepting suggested changes. Avoid the "Update branch" button on the pull request and opt instead for rebasing your branch against main.

@Rajdeepc Rajdeepc requested a review from a team as a code owner November 11, 2024 08:42
@Rajdeepc Rajdeepc self-assigned this Nov 11, 2024
Copy link

Branch preview

Copy link

Tachometer results

Currently, no packages are changed by this PR...

@coveralls
Copy link
Collaborator

coveralls commented Nov 11, 2024

Pull Request Test Coverage Report for Build 11812219355

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.197%

Totals Coverage Status
Change from base Build 11795977313: 0.0%
Covered Lines: 32328
Relevant Lines: 32745

💛 - Coveralls

Copy link

github-actions bot commented Nov 11, 2024

Lighthouse scores

Category Latest (report) Main (report) Branch (report)
Performance 0.99 0.98 0.98
Accessibility 1 1 1
Best Practices 1 1 1
SEO 1 0.92 0.92
PWA 1 1 1
What is this?

Lighthouse scores comparing the documentation site built from the PR ("Branch") to that of the production documentation site ("Latest") and the build currently on main ("Main"). Higher scores are better, but note that the SEO scores on Netlify URLs are artifically constrained to 0.92.

Transfer Size

Category Latest Main Branch
Total 250.686 kB 236.831 kB 🏆 236.937 kB
Scripts 60.531 kB 54.345 kB 🏆 54.395 kB
Stylesheet 54.024 kB 47.99 kB 🏆 48.087 kB
Document 6.225 kB 5.469 kB 🏆 5.474 kB
Font 126.954 kB 126.636 kB 126.632 kB 🏆

Request Count

Category Latest Main Branch
Total 52 52 52
Scripts 41 41 41
Stylesheet 5 5 5
Document 1 1 1
Font 2 2 2

Copy link
Collaborator

@blunteshwar blunteshwar left a comment

Choose a reason for hiding this comment

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

Certain tests are failing. Once we rectify them I think we are good to go!

Copy link
Collaborator

@rubencarvalho rubencarvalho left a comment

Choose a reason for hiding this comment

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

We need to check multiple things:

  1. It would be best if we applied the same rule across the entire project. Currently, this only applies to ./tools/*, but we also have a root-level eslintrc.json file.
  2. If we apply it globally, I’d say projects/documentation is safe to ignore.
  3. This change will likely trigger numerous linting errors, which should be addressed within the scope of this PR.
  4. Can we check if switching to JS-based ESLint configs (instead of JSON) might better support the required changes? This would allow us to add more complex path/package-parsing logic if needed.

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.

4 participants