Fix few typos in React docs and comments
Justas Brazauskas committed
Dec 13, 2015 at 16:39 UTC
08862734382c72752e4346bf05de6dcee374492d
15 files changed
+20
-20
docs/_posts/2013-10-3-community-roundup-9.md
+1
-1
@@ -56,7 +56,7 @@ The video will be available soon on the [JSConf EU website](http://2013.jsconf.e
56
57
[Todd Kennedy](http://blog.selfassembled.org/) working at [Condé Nast](http://www.condenast.com/) implemented a wrapper on-top of [JSHint](http://www.jshint.com/) that first converts JSX files to JS.
58
59
-> A wrapper around JSHint to allow linting of files containg JSX syntax. Accepts glob patterns. Respects your local .jshintrc file and .gitignore to filter your glob patterns.
59
+> A wrapper around JSHint to allow linting of files containing JSX syntax. Accepts glob patterns. Respects your local .jshintrc file and .gitignore to filter your glob patterns.
60
>
61
> ```
62
npm install -g jsxhint
docs/_posts/2014-01-06-community-roundup-14.md
+1
-1
@@ -13,7 +13,7 @@ React is only one-piece of your web application stack. [Mark Lussier](https://gi
13
>
14
> I encourage you to fork, and make it right and submit a pull request!
15
>
16
-> My current opinion is using tools like Grunt, Browserify, Bower and mutiple grunt plugins to get the job done. I also opted for Zepto over jQuery and the Flatiron Project's Director when I need a router. Oh and for the last little bit of tech that makes you mad, I am in the SASS camp when it comes to stylesheets
16
+> My current opinion is using tools like Grunt, Browserify, Bower and multiple grunt plugins to get the job done. I also opted for Zepto over jQuery and the Flatiron Project's Director when I need a router. Oh and for the last little bit of tech that makes you mad, I am in the SASS camp when it comes to stylesheets
17
>
18
> [Check it out on GitHub...](https://github.com/intabulas/reactjs-baseline)
19
docs/_posts/2014-02-16-react-v0.9-rc1.md
+1
-1
@@ -49,7 +49,7 @@ React.DOM.div(null,
49
)
50
```
51
52
-We believe this new behavior is more helpful and elimates cases where unwanted whitespace was previously added.
52
+We believe this new behavior is more helpful and eliminates cases where unwanted whitespace was previously added.
53
54
In cases where you want to preserve the space adjacent to a newline, you can write a JS string like `{"Monkeys: "}` in your JSX source. We've included a script to do an automated codemod of your JSX source tree that preserves the old whitespace behavior by adding and removing spaces appropriately. You can [install jsx\_whitespace\_transformer from npm](https://github.com/facebook/react/blob/master/npm-jsx_whitespace_transformer/README.md) and run it over your source tree to modify files in place. The transformed JSX files will preserve your code's existing whitespace behavior.
55
docs/_posts/2014-02-20-react-v0.9.md
+1
-1
@@ -57,7 +57,7 @@ React.DOM.div(null,
57
)
58
```
59
60
-We believe this new behavior is more helpful and elimates cases where unwanted whitespace was previously added.
60
+We believe this new behavior is more helpful and eliminates cases where unwanted whitespace was previously added.
61
62
In cases where you want to preserve the space adjacent to a newline, you can write `{'Monkeys: '}` or `Monkeys:{' '}` in your JSX source. We've included a script to do an automated codemod of your JSX source tree that preserves the old whitespace behavior by adding and removing spaces appropriately. You can [install jsx\_whitespace\_transformer from npm](https://github.com/facebook/react/blob/master/npm-jsx_whitespace_transformer/README.md) and run it over your source tree to modify files in place. The transformed JSX files will preserve your code's existing whitespace behavior.
63
docs/css/codemirror.css
+2
-2
@@ -5,7 +5,7 @@
5
font-family: monospace;
6
}
7
.CodeMirror-scroll {
8
- /* Set scrolling behaviour here */
8
+ /* Set scrolling behavior here */
9
overflow: auto;
10
}
11
@@ -122,7 +122,7 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
122
}
123
124
/* The fake, visible scrollbars. Used to force redraw during scrolling
125
- before actuall scrolling happens, thus preventing shaking and
125
+ before actual scrolling happens, thus preventing shaking and
126
flickering artifacts. */
127
.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler {
128
position: absolute;
eslint-rules/warning-and-invariant-args.js
+2
-2
@@ -17,7 +17,7 @@
17
*/
18
19
module.exports = function(context) {
20
- // we also allow literal strings and concatinated literal strings
20
+ // we also allow literal strings and concatenated literal strings
21
function getLiteralString(node) {
22
if (node.type === 'Literal' && typeof node.value === 'string') {
23
return node.value;
@@ -67,7 +67,7 @@ module.exports = function(context) {
67
);
68
return;
69
}
70
- // count the number of formating substitutions, plus the first two args
70
+ // count the number of formatting substitutions, plus the first two args
71
var expectedNArgs = (format.match(/%s/g) || []).length + 2;
72
if (node.arguments.length !== expectedNArgs) {
73
context.report(
scripts/jest/preprocessor.js
+1
-1
@@ -19,7 +19,7 @@ var babelPluginDEV = require('fbjs-scripts/babel/dev-expression');
19
var babelPluginModules = require('fbjs-scripts/babel/rewrite-modules');
20
var createCacheKeyFunction = require('fbjs-scripts/jest/createCacheKeyFunction');
21
22
-// Use require.resolve to be resiliant to file moves, npm updates, etc
22
+// Use require.resolve to be resilient to file moves, npm updates, etc
23
var pathToBabel = path.join(require.resolve('babel'), '..', 'package.json');
24
var pathToModuleMap = require.resolve('fbjs/module-map');
25
var pathToBabelPluginDev = require.resolve('fbjs-scripts/babel/dev-expression');
src/isomorphic/classic/class/ReactClass.js
+1
-1
@@ -433,7 +433,7 @@ function validateMethodOverride(proto, name) {
433
434
/**
435
* Mixin helper which handles policy validation and reserved
436
- * specification keys when building React classses.
436
+ * specification keys when building React classes.
437
*/
438
function mixSpecIntoComponent(Constructor, spec) {
439
if (!spec) {
src/isomorphic/classic/element/__tests__/ReactElement-test.js
+1
-1
@@ -213,7 +213,7 @@ describe('ReactElement', function() {
213
it('allows the use of PropTypes validators in statics', function() {
214
// TODO: This test was added to cover a special case where we proxied
215
// methods. However, we don't do that any more so this test can probably
216
- // be removed. Leaving it in classic as a safety precausion.
216
+ // be removed. Leaving it in classic as a safety precaution.
217
var Component = React.createClass({
218
render: () => null,
219
statics: {
src/renderers/dom/client/ReactDOMSelection.js
+1
-1
@@ -162,7 +162,7 @@ function setIEOffsets(node, offsets) {
162
*
163
* Note: IE10+ supports the Selection object, but it does not support
164
* the `extend` method, which means that even in modern IE, it's not possible
165
- * to programatically create a backward selection. Thus, for all IE
165
+ * to programmatically create a backward selection. Thus, for all IE
166
* versions, we use the old IE API to create our selections.
167
*
168
* @param {DOMElement|DOMTextNode} node
src/renderers/dom/client/__tests__/ReactDOMTreeTraversal-test.js
+2
-2
@@ -135,7 +135,7 @@ describe('ReactDOMTreeTraversal', function() {
135
var enter = getInst(parent.refs.P_P1_C1.refs.DIV_2);
136
var expectedAggregation = [
137
{node: parent.refs.P_P1_C1.refs.DIV_1, isUp: true, arg: ARG},
138
- // enter/leave shouldn't fire antyhing on the parent
138
+ // enter/leave shouldn't fire anything on the parent
139
{node: parent.refs.P_P1_C1.refs.DIV_2, isUp: false, arg: ARG2},
140
];
141
ReactDOMTreeTraversal.traverseEnterLeave(
@@ -245,7 +245,7 @@ describe('ReactDOMTreeTraversal', function() {
245
two: parent.refs.P_P1,
246
com: parent.refs.P_P1,
247
},
248
- // Grantparent across subcomponent boundaries.
248
+ // Grandparent across subcomponent boundaries.
249
{
250
one: parent.refs.P_P1_C1.refs.DIV_1,
251
two: parent.refs.P_P1_C2.refs.DIV_1,
src/renderers/dom/shared/ReactDOMComponent.js
+2
-2
@@ -91,7 +91,7 @@ function friendlyStringify(obj) {
91
} else if (typeof obj === 'function') {
92
return '[function object]';
93
}
94
- // Differs from JSON.stringify in that undefined becauses undefined and that
94
+ // Differs from JSON.stringify in that undefined because undefined and that
95
// inf and nan don't become null
96
return String(obj);
97
}
@@ -929,7 +929,7 @@ ReactDOMComponent.Mixin = {
929
DOMProperty.isCustomAttribute(propKey)) {
930
var node = getNode(this);
931
// If we're updating to null or undefined, we should remove the property
932
- // from the DOM node instead of inadvertantly setting to a string. This
932
+ // from the DOM node instead of inadvertently setting to a string. This
933
// brings us in line with the same behavior we have on initial render.
934
if (nextProp != null) {
935
DOMPropertyOperations.setValueForProperty(node, propKey, nextProp);
src/renderers/dom/shared/__tests__/ReactDOMComponent-test.js
+2
-2
@@ -242,7 +242,7 @@ describe('ReactDOMComponent', function() {
242
it('should skip child object attribute on web components', function() {
243
var container = document.createElement('div');
244
245
- // Test intial render to null
245
+ // Test initial render to null
246
ReactDOM.render(<my-component children={['foo']} />, container);
247
expect(container.firstChild.hasAttribute('children')).toBe(false);
248
@@ -920,7 +920,7 @@ describe('ReactDOMComponent', function() {
920
describe('onScroll warning', function() {
921
it('should warn about the `onScroll` issue when unsupported (IE8)', () => {
922
// Mock this here so we can mimic IE8 support. We require isEventSupported
923
- // before React so it's pre-mocked before React qould require it.
923
+ // before React so it's pre-mocked before React would require it.
924
jest.resetModuleRegistry()
925
.mock('isEventSupported');
926
var isEventSupported = require('isEventSupported');
src/renderers/shared/event/eventPlugins/ResponderEventPlugin.js
+1
-1
@@ -156,7 +156,7 @@ var eventTypes = {
156
* interaction is no longer locked to it - the system has taken over.
157
*
158
* - Responder being released:
159
- * As soon as no more touches that *started* inside of descendents of the
159
+ * As soon as no more touches that *started* inside of descendants of the
160
* *current* responderInst, an `onResponderRelease` event is dispatched to the
161
* current responder, and the responder lock is released.
162
*
src/test/MetaMatchers.js
+1
-1
@@ -20,7 +20,7 @@
20
function getRunnerWithResults(describeFunction) {
21
if (describeFunction._cachedRunner) {
22
// Cached result of execution. This is a convenience way to test against
23
- // the same authorative function multiple times.
23
+ // the same authoritative function multiple times.
24
return describeFunction._cachedRunner;
25
}
26
// Patch the current global environment.