qwik icon indicating copy to clipboard operation
qwik copied to clipboard

Feat: Use function eslint rules

Open nnelgxorz opened this issue 2 years ago • 2 comments

What is it?

  • [x] Feature / enhancement
  • [ ] Bug
  • [ ] Docs / tests

Description

ESLint rules to check if

  • a use function is called outside of component / another use function
  • a use function is called outside the root level of a callback

Additionally, adds some type helpers to catch bad configuration settings before CI and re-enables tests for the ESLint plugin.

Closes: #652

Checklist:

  • [x] My code follows the developer guidelines of this project
  • [x] I have performed a self-review of my own code
  • [ ] I have made corresponding changes to the documentation
  • [x] Added new tests to cover the fix / functionality

nnelgxorz avatar Aug 01 '22 05:08 nnelgxorz

Love it! tomorrow going to give it a try and merge!

manucorporat avatar Aug 02 '22 21:08 manucorporat

I'm sure there can be improvements and more test cases. So, let me know what you find!

nnelgxorz avatar Aug 03 '22 00:08 nnelgxorz

We got it all this implemented as part of the use-method eslint rule! sorry for closing it :(

manucorporat avatar Apr 19 '23 13:04 manucorporat