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

[feature]: Idea for static code analysis of PWA Stduio modules #2633

Open
8 tasks
larsroettig opened this issue Aug 16, 2020 · 3 comments
Open
8 tasks

[feature]: Idea for static code analysis of PWA Stduio modules #2633

larsroettig opened this issue Aug 16, 2020 · 3 comments
Labels

Comments

@larsroettig
Copy link
Member

larsroettig commented Aug 16, 2020

Is your feature request related to a problem? Please describe.

All PWA modules should be checked for consistency through a validation process.
This should work similarly to the Magento Coding Style an idea would be to build an eslint rule

Describe the solution you'd like

Idea we parse package.json check for "pwa-studio": {"targets": { "intercept" there
is defined if it is an PWA Extensions.

We add this folder to our validation process the every PWA Extensions need the esModules flag in the intercept file. Also we search if contains the module any .css or .graphql then flags cssModules flag or graphqlQueries flag are required.

I think what we also should check if a .js contains an import for @magento/peregrine but
is it is not defined as peerDependencies then we should throw an error for missing peer dependencies.

Describe alternatives you've considered

Additional context

Please let us know what packages this feature is in regards to:

  • venia-concept
  • venia-ui
  • pwa-buildpack
  • peregrine
  • pwa-devdocs
  • upward-js
  • upward-spec
  • create-pwa
@larsroettig larsroettig added the enhancement New feature or request label Aug 16, 2020
@m2-assistant
Copy link

m2-assistant bot commented Aug 16, 2020

Hi @larsroettig. Thank you for your report.
To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


@larsroettig
Copy link
Member Author

@zetlen what do think about this?

@awilcoxa
Copy link

Created PWA-868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants