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

improve error reporting in some cases #42

Open
alexander-akait opened this issue Jul 16, 2019 · 4 comments
Open

improve error reporting in some cases #42

alexander-akait opened this issue Jul 16, 2019 · 4 comments

Comments

@alexander-akait
Copy link
Member

alexander-akait commented Jul 16, 2019

  • Operating System: any
  • Node Version: any
  • NPM Version: any
  • webpack Version: any
  • schema-utils Version: 2.0.0

Feature Proposal

Supports:

  • better errors for not keyword, for example ({ "not": { "minimum": 3 } } should output should not be < 3 | should be any non-number)
  • improve message for objects like object { key: string }

Feature Use Case

Better error reporting

@vankop
Copy link
Member

vankop commented Sep 27, 2019

@evilebottnawi I think it will be better, if you will describe what you mean in 2nd proposal

@alexander-akait
Copy link
Member Author

alexander-akait commented Sep 27, 2019

@vankop
Now https://github.com/webpack/schema-utils/blob/master/test/__snapshots__/index.test.js.snap#L1544

Expected: object { foo?: boolean, bar?: integer } (boolean and integer just example maybe in test should be other value).

Also printing objects now is very unreadable when we have a lot of properties, will be great break them in style:

object { 
  bar1, 
  bar2,
  bar3, 
  bar4, 
  bar5, 
  bar6, 
  bar7 
}

But it is other issue

@vankop
Copy link
Member

vankop commented Sep 27, 2019

i will take second one, if you did not start it =)

@alexander-akait
Copy link
Member Author

Feel free to send a PR 👍

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

No branches or pull requests

2 participants