stencil-community / stencil-eslint

ESLint rules specific to Stencil JS projects
MIT License
61 stars 34 forks source link

Ban default true #75

Closed ysulyma closed 1 year ago

ysulyma commented 2 years ago

Pull request checklist

Please check if your PR fulfills the following requirements:

Pull request type

Please check the type of change your PR introduces: - [ ] Bugfix - [x] Feature - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [x] Documentation content changes - [ ] Other (please describe): ## What is the current behavior? In HTML, [boolean attributes always default to `false`](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#boolean-attributes). For example, we have the attributes `disabled` and `noValidate` instead of `enabled="false"` and `validate="false"`. This PR adds a rule to enforce similar behavior in Stencil components. ## What is the new behavior? Added new rule `ban-default-true` to warn about Props which default to `true`. ## Does this introduce a breaking change? - [x] Yes - [ ] No Existing applications would need to change any Props that default to `true`. ## Testing Added unit tests. ## Other information
raphaelpor commented 1 year ago

@ysulyma Great addition! πŸš€ Could you please solve the conflicts so we can start reviewing and testing the changes?

ysulyma commented 1 year ago

@raphaelpor sorry for late reply, have rebased now!

raphaelpor commented 1 year ago

Thanks @ysulyma,

But looks like your tests are failing. Could you help us checking it?

Have a nice day. πŸ‘‹

Screenshot 2023-04-26 at 10 39 40
ysulyma commented 1 year ago

@raphaelpor should be fixed now!

raphaelpor commented 1 year ago

Thanks for your contribution and patience, @ysulyma. I will proceed with the merge. πŸš€