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

[ISSUE/348] Only display user-defined JS lint errors #745

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

Conversation

makinox
Copy link

@makinox makinox commented Oct 6, 2022

Description

  • Add ignore patterns to avoid non development errors and warnings
  • Update package.json generator tests

Fixes # (348)

Type of change

  • Code cleanup
  • 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 not work as expected)
  • This change requires a documentation update

Copy link
Contributor

@sodic sodic left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @makinox!

This is a good approach, but there's one comment/request to be addressed before we merge the PR.

Comment on lines 15 to 19
"extends": "react-app",
"ignorePatterns": [
"src/*",
"!src/ext-src"
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Good idea for a fix! I think this is the best short-term solution.

One important thing to note, however. The current approach assumes and hardcodes the ext-src inside the package.json file. Wasp's directory structure will most likely go through a lot of changes in the near future and we want to make sure this changes accordingly.

Ideally like to read and interpolate this path from a single source of truth (i.e., here). You can do this using the same templating system that's used for depsChunk and devDepsChunk. It involves editing a bit of Haskell code. Let me know if you need any help :)

Copy link
Author

Choose a reason for hiding this comment

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

Ok, on my way 🏃‍♂️

Copy link
Author

Choose a reason for hiding this comment

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

DONE ⚡️, I was going to reuse that path even more, but I watched in your code that you are not doing that with your path variables GeneratedExternalCodeDir, maybe there is a good reason that I don't know yet, let me know if this solves the issue 🫡😬

Copy link
Contributor

@sodic sodic Oct 14, 2022

Choose a reason for hiding this comment

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

Thanks for the changes!

However, we already have an appropriate constant (source of truth) for this. I liked to it in the previous comment. Please use that one (you can move it to WebAppGenerator/Common).

but I watched in your code that you are not doing that with your path variables GeneratedExternalCodeDir

Not sure I got this. Can you elaborate and/or list an example?

@sodic sodic self-assigned this Oct 11, 2022
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.

None yet

2 participants