Git Product home page Git Product logo

eslint-config-andyet-react's People

Contributors

latentflip avatar lukekarrys avatar pdehaan avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

pdehaan

eslint-config-andyet-react's Issues

react/jsx-no-bind

This does a pretty good job of explaining why this rule exists and should arguably be used: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md#lists-of-items

The problem I've found is that its quite cumbersome to create a new class in order to not use an arrow fn, especially if you list item is very simple. I've never seen the performance implications of this either, so it feels a bit like premature optimization, but I have no data either way. It seems like a good rule in theory, which is why I added it originally, but I've found myself working around it multiple times now in ways I wish I didn't have to.

Rule addition: force/warn for ambiguous prop types

"react/forbid-prop-types": [2, {"forbid": ["any", "array", "object"]}]

The docs explain it pretty well but the gist is that array and object prop types are ambiguous because they can contain values of any type so it kind of defeats the purpose of using prop types.

If we use this rule to forbid them, then arrayOf and shape can be used instead to provide more detail into what exactly is being passed to a component.

Publish v1

  • Possibly discuss #1 and #2
  • Test on more repos that @latentflip had in mind
  • Use those repos to iterate on any rules
  • Publish

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.