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

ESLint preset and rules #98

Open
brainkim opened this issue May 6, 2020 · 0 comments
Open

ESLint preset and rules #98

brainkim opened this issue May 6, 2020 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@brainkim
Copy link
Member

brainkim commented May 6, 2020

After seeing some crank code in the wild I definitely think Crank could do with some rules to make writing cranky code a little easier and catch possible bugs.

Some possible rules specific to Crank:

  • Warn when a dev provides a default value for a prop in the parameter list which isn’t exactly reflected in the context iteration (nobody discovered this flaw of this iteration in the many issues discussing library design heheheheheh).
  • Warn when a dev yields and implicitly returns from a generator component without a loop.
  • Warn when a dev unnecessarily uses generator components.
  • Warn when a dev unnecessarily uses async components (maybe handled by missing await.

I think we might also want to squash for ({} of this)/for await ({} of this) errors as well as include the generic JSX/accessibility rules from React.

@brainkim brainkim added enhancement New feature or request help wanted Extra attention is needed labels May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant