eslint-config-andyet-react's People
Forkers
pdehaaneslint-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.
Rule addition: func-style
Is there a particular type of function style (declaration, express, arrow, etc) that we want to use consistently? http://eslint.org/docs/rules/func-style
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.