Anton Honcharuk
be07f7a020
[guide] [react] add more context about arrow functions, as props and in class fields
2019-02-24 13:28:34 +02:00
Telmen Munkhdalai
1439ebe78d
[editorial] [react] fix typo
2019-01-26 16:55:34 +08:00
Rahil Vora
95286eb496
[guide] [react] add note about forbid-prop-types rule
2019-01-07 10:24:16 -06:00
Pirasis Leelatanon
24da5bb540
[doc] add eslint rule references in react guide
...
* react/jsx-filename-extension
* react/no-array-index-key
2018-10-04 20:29:10 +07:00
Kevin Weber
48448a81cc
[guide] [react] Explain use of ID over key right on page
2018-08-26 17:41:01 -07:00
Kevin Weber
5443d03de2
[guide] Consistently use curly quotes instead of straight quotes in prose
2018-08-26 17:50:48 -07:00
Kevin Weber
ced1cb3ad8
List bad example first to be consistent
2018-08-26 17:15:08 -07:00
Andrew Scheuermann
a12dec90d1
[guide] [react] boolean in jsx alignment
2018-07-11 16:26:22 -07:00
Alejandro García Salas
8a24480119
Fix broken aria roles link in React style guide README
2018-06-03 10:48:10 -07:00
Nguyễn Tiến Minh
2653730fee
[react] add vietnamese
2018-04-21 13:51:56 +07:00
Simon Owen
06e28997b2
Minor spacing update
2018-03-28 15:39:14 +01:00
Rauno Freiberg
fd68fdbd22
[guide] [react] add comment about what JS standards are followed
...
Seen a few pull requests for the React style guide that try to introduce features that aren't yet in stage >= 3 (static class fields for i.e), so I've decided to add a comment to the beginning of the guide. Not sure if this is the right place to put it, but here it is.
This disclaimer might help:
1) give the community an idea what standards this guide is based on
2) prevent redundant pull requests
2018-02-20 19:28:52 +02:00
Ali Oğuzhan Yıldız
17b6491ae2
add Turkish translation
2017-09-04 00:00:04 +03:00
Maggie Love
5682155e9a
Adds section about spreading props
2017-11-01 18:33:54 -04:00
Ed Morley
7ff6303513
[guide] Use HTTPS for links to ESLint documentation
...
The result of a `s_http://eslint\.org_https://eslint\.org_g `.
Avoids the HTTP 302s of the non-HTTPs URLs.
2017-10-30 13:19:22 +00:00
Piotr Lasota
9d3e7e0a2c
Add component with className as anti-pattern example
2017-10-25 20:05:40 +02:00
Piotr Lasota
999fe3b83a
Change className to variant in examples
2017-10-25 20:03:56 +02:00
Joe Lencioni
68cdc59362
[eslint config] [new] Enable react/jsx-closing-tag-location
2017-08-22 15:38:13 -07:00
Dhruvdutt Jadhav
a79237b020
[guide] [react] add another “good” example
2017-08-17 22:54:31 +05:30
Gustavo Isensee
1bbac74286
Updated "how to define propTypes..."
...
Imported from new prop-types module.
2017-06-13 00:59:43 -03:00
Jordan Harband
152eaa6669
[guide] [react] Update React README ref to jsx-a11y/jsx-space-before-closing
2017-05-09 10:39:35 -07:00
Trevor Sayre
2f912c1dd3
[guide] [react] Update React README ref to jsx-a11y/img-has-alt
...
https://github.com/evcohen/eslint-plugin-jsx-a11y/pull/220
2017-05-09 13:12:09 -04:00
Martin Veith
8eee1f1b69
[guide] [react] Add missing semicolons
2017-04-22 18:16:18 +02:00
Kaka
2c0da30904
Fix the example of "propTypes"
...
This example makes me confused. I guess it missed the use of "children" of good code.
Is the example to explain that you should specify default values for non-required props?
Thanks
2017-04-12 16:43:12 +08:00
Nikita
462ea7dd0a
translation links in react guide updated
2017-04-12 02:05:40 +05:00
Nikita
cb027cd002
translation links sorted
2017-04-12 02:01:16 +05:00
Jaden Dessureault
98f1b19d95
Indent blockquotes in markdown guides
...
This is required to make sure all code blocks have proper syntax highlighting
2017-03-22 19:55:14 -05:00
Raj Nigam
b153231867
Update renamed jsx-wrap-multilines
...
`react/wrap-multilines` has been renamed to `react/jsx-wrap-multilines`
2017-02-23 11:36:24 -05:00
Joe Lencioni
d23b442799
Add link to Mixins section in TOC
...
I forgot this when I created the section.
2017-02-14 10:46:19 -08:00
Joe Lencioni
1841d2fb99
Add guidance around not using mixins
...
Mixins will hopefully be removed from React eventually. In the meantime,
we can avoid the damage they cause by not using them. Most of this was
borrowed from @gaearon's blog post "Mixins Considered Harmful".
https://facebook.github.io/react/blog/2016/07/13/mixins-considered-harmful.html
2017-02-14 10:31:45 -08:00
Harkirat Saluja
40d5797b35
[guide] [react] Add missing trailing comma
2017-01-17 14:59:41 +05:30
Ivan Zusko
2df021eb83
[guide] [react] Added React/JSX Style Guide in Ukrainian
2017-01-04 10:58:43 +02:00
alejandro garcia
243d824fb4
[guide] [react] Added react jsx guide in spanish
2016-12-07 19:19:54 +01:00
soulchainer
780be0dcd9
[guide][react] Add missing parenthesis in «Refs» recommendation
...
As is, actual «good» usage fires the arrow-parens rule.
Parenthesis are needed to follow the current style guide.
2016-12-04 02:11:48 +01:00
Jordan Harband
b73649925a
[guide] [react] add note that defaultProps must always be provided for non-required props
2016-11-09 22:53:09 -08:00
Ryan Busby
86f52012cd
[guide] quotes: corrected casing
...
Updated case to read the same in multiple spots. Added single quote example
2016-11-02 20:13:59 -07:00
Kevin Grandon
f9a5dd4919
Update JSX quote style rationale.
...
Based on https://github.com/airbnb/javascript/issues/629#issuecomment-166384924 .
2016-11-01 13:54:07 -07:00
Pete Pirasis
adc782343e
[react] add rule references in section *Spacing*
2016-10-27 01:58:42 +07:00
SpenUK
0e2b74a263
Add links to mentioned github issues
2016-10-26 16:45:32 +11:00
Joe Lencioni
a599bca474
Add rule to avoid misusing DOM component prop names
...
People expect props like `style` and `className` to mean one specific
thing. Varying this API for a subset of your app makes the code less
readable and less maintainable, and may cause bugs.
2016-09-19 11:42:12 -07:00
Kazuki Yamada
11b9adff01
Fix japanese translation link
2016-09-16 02:39:35 +09:00
Jordan Eldredge
7d46d3c59f
Document react/require-render-return as a fully fledged rule
...
Now that the pull request has been merged, we can reference the actual rule.
2016-09-08 09:56:57 -07:00
Thomas Marek
a43c16e330
Explain why not to prefix methods with underscores
2016-08-29 18:19:22 -04:00
Mitsuru Ogawa
d20f33f660
Add link for Japanese translation
2016-08-09 19:06:43 +09:00
Joe Lencioni
52a2da4182
Add curlies around ref function body
...
The example we have here uses an implicit return, which is forbidden
when assigning. This triggers the no-return-assign rule.
Fixes #980
2016-08-02 09:09:12 -07:00
Zane Mountcastle
75c961a43f
Change 'Brazilian' to 'Portuguese'
2016-08-01 10:41:15 +08:00
Joe Lencioni
4dbb2af7da
Improve React HOC example
...
I decided that `WrappedComponent` is clearer than `Component` here, so I
made the switch. I also realized that `WrappedComponent.name` might
still be undefined, so I added a fallback value of "Component".
2016-07-27 09:54:00 -07:00
Joe Lencioni
1917968acb
Add missing closing paren in HOC guideline
...
As pointed out by eagle-eyed @pepakriz.
2016-07-27 09:53:42 -07:00
Joe Lencioni
4c8f78921f
Add guideline for displayName in higher-order components
...
This guideline will help us keep our higher-order components consistent
and easy to understand.
Fixes #968 .
2016-07-26 16:51:08 -07:00
Doug Cole
892128366a
change 'conjunctions' to 'contractions'
2016-07-23 11:53:45 -07:00