Skip to content

v1.21.0

Compare
Choose a tag to compare
@Rel1cx Rel1cx released this 20 Dec 02:29
· 363 commits to main since this release
4cccae1

What's Changed

✨ New

  • feat(plugins/hooks-extra): add no-useless-custom-hooks rule by @Rel1cx

🪄 Improvements

  • refactor(plugins/hooks-extra): deprecate rule no-redundant-custom-hook in favor of no-useless-custom-hooks (the previous rule will still be available until the next major update to avoid breaking changes)
  • docs: document active rules, closes #830 by @Rel1cx in #882
  • docs: add setup instructions and example to pure JS project, closes #844 by @Rel1cx in #885

📝 Changes in Rule implementation

no-useless-custom-hooks now detects Hook calls within comments and the following code no longer triggers a warning:

// ✅ Good: A Hook that will likely use some other Hooks later
function useAuth() {
  // TODO: Replace with this line when authentication is implemented:
  // return useContext(Auth);
  return TEST_USER;
}

Full Changelog: v1.20.1...v1.21.0