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
Your NameRonaldo
723e12a87d
Airbnb React/JSX Style Guide translation for PT-BR
2016-07-18 18:20:32 -03:00
Your NameRonaldo
97da7b65c6
Airbnb React/JSX Style Guide translation for PT-br
2016-07-18 18:17:59 -03:00
Kevin Grandon
36d1561596
Prevent using string refs.
...
According to the official React documentation string refs are considered legacy and will be deprecated in the future.
2016-06-28 10:13:36 -07:00
Anton Backer
343dc2c34a
Remove parens around single argument in React example
...
Parens around a single argument aren't in line with the js guide:
If your function takes a single argument and doesn’t use braces,
omit the parentheses.
0814be638f/README.md (arrows--one-arg-parens)
Another rule violation:
Wrap JSX tags in parentheses when they span more than one line.
0814be638f/react/README.md (parentheses)
2016-06-17 17:33:49 -07:00
hunyong-song
22f59b6e1b
Adding link korean translation
2016-06-16 10:20:03 +09:00
Lukasz Pietraszek
29eb575a52
Adding link polish translation
2016-06-11 09:39:03 +01:00
Alanna Scott
c247fd754b
Avoid using an array index as key prop, prefer unique ID
2016-05-25 12:30:34 -07:00
Jordan Harband
4c4210f23d
Remove trailing whitespace.
2016-05-25 18:19:19 +02:00
Jason
a8839173cc
add chinese simplified for React/JSX style guide
2016-05-25 16:50:37 +08:00
Jimmy Jia
79af88d9d6
Clarify stateless component function naming
2016-04-22 12:13:22 -04:00
Jordan Harband
2dfd520930
[eslint config] [react] Add guide section on react/jsx-curly-spacing
...
Per #693 .
2016-04-19 20:54:45 -07:00
Joe Lencioni
02414502b6
Upgrade eslint-plugin-jsx-a11y 0.6.2 -> 1.0.1
...
This new version renames most of the rules, and adds a number of new
rules that we will need to evaluate. I simply added them for now with
TODO comments so we remember to come back to them and make decisions
about each one. I also alphabetized the list to make it easier to find
what you are looking for.
2016-04-19 17:22:43 -07:00
Joe Lencioni
a929776d67
Improve guideline for image alt text
...
After digging into this rule a little more with @evcohen, we believe that
it is okay for images to have an empty string for alt text and have
updated the plugin to reflect that understanding. This commit bumps our
dependency on the rule to include this fix and updates our guideline to
match.
2016-04-08 18:42:51 -07:00
Jordan Harband
7c0bb0a6de
[eslint config] [breaking] enable react/require-render-return
2016-04-06 22:57:44 -07:00
Joe Lencioni
3f73e35b18
Use jsx fenced codeblocks for JSX code
...
GitHub knows how to do JSX syntax highlighting. Since we are using JSX
in this document, I figured we might as well tell GitHub to highlight
the syntax as JSX here. This will lead to a better reading experience.
2016-04-06 14:51:45 -07:00
Joe Lencioni
f697a15e50
Add note and rule about not using accessKey
...
Inconsistencies between keyboard shortcuts and keyboard commands used by
people using screenreaders and keyboards complicate accessibility.
2016-04-06 14:51:44 -07:00
Joe Lencioni
0c3b13fe93
Add note and rule about valid, non-abstract ARIA roles
...
This rule will help people use only valid roles, which might save people
from simple, accessibility-busting mistakes.
2016-04-06 14:51:44 -07:00
Joe Lencioni
f2aca29ed9
Add note and rule about redundant alt text
...
Screenreaders already announce `img` elements as images, so there is no
need to include this information in the alt text. This will give people
using assistive technologies a smoother experience.
2016-04-06 14:51:44 -07:00
Joe Lencioni
acbddc1083
Add note and rule about image alt text
...
We want our React apps to be accessible. One thing that developers can
do is properly use alt text on images. Thankfully, there is an ESLint
rule that will enforce these things for us.
2016-04-06 14:51:22 -07:00
Gil Birman
94ace27f46
Allow arrow functions in JSX props
2016-03-21 14:53:48 -07:00
David Petersen
03d0054a46
Enable react/prefer-stateless-function rule
2016-03-02 09:19:16 -06:00
Joe Lencioni
e007ec5be9
Sort static methods above constructor for React
...
I think it makes more sense to put static methods above the constructor
in classes. I would like to update the ESLint configuration to match
this, but it looks like the react/sort-comp rule does not support it
quite yet.
https://github.com/yannickcr/eslint-plugin-react/issues/128
2016-02-04 11:01:17 -08:00
Jordan Harband
da1d031ff8
[guide] [react] add a note preferring normal functions for functional stateless components.
2016-01-26 15:03:13 -08:00
Matt Brennan
94776c35eb
Remove language interpretable as an ableist slur
2016-01-26 14:20:55 +00:00
Harrison Shoff
992a9cea58
[react][rule links] add eslint labels back
2016-01-25 22:23:16 -08:00