Skip to content

Commit 909d938

Browse files
existentialismfson
authored andcommitted
Fix some typos (#809)
1 parent 27e76be commit 909d938

File tree

7 files changed

+34
-34
lines changed

7 files changed

+34
-34
lines changed

packages/eslint-config-react-app/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
// Inspired by https://github.com/airbnb/javascript but less opinionated.
1111

12-
// We use eslint-loader so even warnings are very visibile.
12+
// We use eslint-loader so even warnings are very visible.
1313
// This is why we only use "WARNING" level for potential errors,
1414
// and we don't use "ERROR" level at all.
1515

packages/react-dev-utils/webpackHotDevClient.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ function ensureOverlayDivExists(onOverlayDivReady) {
106106
lastOnOverlayDivReady(overlayDiv);
107107
});
108108

109-
// Zalgo alert: onIframeLoad() will be called either synchronouly
109+
// Zalgo alert: onIframeLoad() will be called either synchronously
110110
// or asynchronously depending on the browser.
111111
// We delay adding it so `overlayIframe` is set when `onIframeLoad` fires.
112112
document.body.appendChild(overlayIframe);

packages/react-scripts/config/webpack.config.dev.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var paths = require('./paths');
2525
var publicPath = '/';
2626
// `publicUrl` is just like `publicPath`, but we will provide it to our app
2727
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
28-
// Omit trailing shlash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.
28+
// Omit trailing slash as %PUBLIC_PATH%/xyz looks better than %PUBLIC_PATH%xyz.
2929
var publicUrl = '';
3030
// Get environment variables to inject into our app.
3131
var env = getClientEnvironment(publicUrl);

packages/react-scripts/scripts/build.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// Do this as the first thing so that any code reading it knows the right env.
1313
process.env.NODE_ENV = 'production';
1414

15-
// Load environment variables from .env file. Surpress warnings using silent
15+
// Load environment variables from .env file. Suppress warnings using silent
1616
// if this file is missing. dotenv will never modify any environment variables
1717
// that have already been set.
1818
// https://github.com/motdotla/dotenv

packages/react-scripts/scripts/start.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
process.env.NODE_ENV = 'development';
1313

14-
// Load environment variables from .env file. Surpress warnings using silent
14+
// Load environment variables from .env file. Suppress warnings using silent
1515
// if this file is missing. dotenv will never modify any environment variables
1616
// that have already been set.
1717
// https://github.com/motdotla/dotenv

packages/react-scripts/scripts/test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
process.env.NODE_ENV = 'test';
1313
process.env.PUBLIC_URL = '';
1414

15-
// Load environment variables from .env file. Surpress warnings using silent
15+
// Load environment variables from .env file. Suppress warnings using silent
1616
// if this file is missing. dotenv will never modify any environment variables
1717
// that have already been set.
1818
// https://github.com/motdotla/dotenv

packages/react-scripts/template/README.md

+28-28
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
22

3-
Below you will find some information on how to perform common tasks.
3+
Below you will find some information on how to perform common tasks.
44
You can find the most recent version of this guide [here](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).
55

66
## Table of Contents
@@ -100,13 +100,13 @@ For the project to build, **these files must exist with exact filenames**:
100100

101101
You can delete or rename the other files.
102102

103-
You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack.
103+
You may create subdirectories inside `src`. For faster rebuilds, only files inside `src` are processed by Webpack.
104104
You need to **put any JS and CSS files inside `src`**, or Webpack won’t see them.
105105

106-
Only files inside `public` can be used from `public/index.html`.
106+
Only files inside `public` can be used from `public/index.html`.
107107
Read instructions below for using assets from JavaScript and HTML.
108108

109-
You can, however, create more top-level directories.
109+
You can, however, create more top-level directories.
110110
They will not be included in the production build so you can use them for things like documentation.
111111

112112
## Available Scripts
@@ -123,7 +123,7 @@ You will also see any lint errors in the console.
123123

124124
### `npm test`
125125

126-
Launches the test runner in the interactive watch mode.
126+
Launches the test runner in the interactive watch mode.
127127
See the section about [running tests](#running-tests) for more information.
128128

129129
### `npm run build`
@@ -189,7 +189,7 @@ npm install --save <library-name>
189189

190190
## Importing a Component
191191

192-
This project setup supports ES6 modules thanks to Babel.
192+
This project setup supports ES6 modules thanks to Babel.
193193
While you can still use `require()` and `module.exports`, we encourage you to use [`import` and `export`](http://exploringjs.com/es6/ch_modules.html) instead.
194194

195195
For example:
@@ -323,7 +323,7 @@ function Header() {
323323
export default function Header;
324324
```
325325

326-
This ensures that when the project is built, webpack will correctly move the images into the build folder, and provide us with correct paths.
326+
This ensures that when the project is built, Webpack will correctly move the images into the build folder, and provide us with correct paths.
327327

328328
This works in CSS too:
329329

@@ -337,7 +337,7 @@ Webpack finds all relative module references in CSS (they start with `./`) and r
337337

338338
Please be advised that this is also a custom feature of Webpack.
339339

340-
**It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images).
340+
**It is not required for React** but many people enjoy it (and React Native uses a similar mechanism for images).
341341
An alternative way of handling static assets is described in the next section.
342342

343343
## Using the `public` Folder
@@ -362,7 +362,7 @@ Inside `index.html`, you can use it like this:
362362

363363
Only files inside the `public` folder will be accessible by `%PUBLIC_URL%` prefix. If you need to use a file from `src` or `node_modules`, you’ll have to copy it there to explicitly specify your intention to make this file a part of the build.
364364

365-
When you run `npm run build`, Create React App will substitute `%PUBLIC_URL%` with a correct absolute path so your project works even if you use client-side routing or host it at a non-root URL.
365+
When you run `npm run build`, Create React App will substitute `%PUBLIC_URL%` with a correct absolute path so your project works even if you use client-side routing or host it at a non-root URL.
366366

367367
In JavaScript code, you can use `process.env.PUBLIC_URL` for similar purposes:
368368

@@ -511,28 +511,28 @@ REACT_APP_SECRET_CODE=abcdef npm start
511511
512512
>Note: this feature is available with `react-scripts@0.5.0` and higher.
513513
514-
To define permanent environment vairables, create a file called `.env` in the root of your project:
514+
To define permanent environment variables, create a file called `.env` in the root of your project:
515515
516516
```
517517
REACT_APP_SECRET_CODE=abcdef
518518
```
519519
520-
These variables will act as the defaults if the machine does not explicitly set them.
520+
These variables will act as the defaults if the machine does not explicitly set them.
521521
Please refer to the [dotenv documentation](https://github.com/motdotla/dotenv) for more details.
522522
523523
>Note: If you are defining environment variables for development, your CI and/or hosting platform will most likely need
524524
these defined as well. Consult their documentation how to do this. For example, see the documentation for [Travis CI](https://docs.travis-ci.com/user/environment-variables/) or [Heroku](https://devcenter.heroku.com/articles/config-vars).
525525
526526
## Can I Use Decorators?
527527
528-
Many popular libraries use [decorators](https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841) in their documentation.
528+
Many popular libraries use [decorators](https://medium.com/google-developers/exploring-es7-decorators-76ecb65fb841) in their documentation.
529529
Create React App doesn’t support decorator syntax at the moment because:
530530
531531
* It is an experimental proposal and is subject to change.
532532
* The current specification version is not officially supported by Babel.
533533
* If the specification changes, we won’t be able to write a codemod because we don’t use them internally at Facebook.
534534
535-
However in many cases you can rewrite decorator-based code without decorators just as fine.
535+
However in many cases you can rewrite decorator-based code without decorators just as fine.
536536
Please refer to these two threads for reference:
537537
538538
* [#214](https://github.com/facebookincubator/create-react-app/issues/214)
@@ -548,7 +548,7 @@ Check out [this tutorial](https://www.fullstackreact.com/articles/using-create-r
548548
549549
>Note: this feature is available with `react-scripts@0.2.3` and higher.
550550
551-
People often serve the front-end React app from the same host and port as their backend implementation.
551+
People often serve the front-end React app from the same host and port as their backend implementation.
552552
For example, a production setup might look like this after the app is deployed:
553553
554554
```
@@ -575,7 +575,7 @@ Fetch API cannot load http://localhost:4000/api/todos. No 'Access-Control-Allow-
575575
576576
Keep in mind that `proxy` only has effect in development (with `npm start`), and it is up to you to ensure that URLs like `/api/todos` point to the right thing in production. You don’t have to use the `/api` prefix. Any unrecognized request without a `text/html` accept header will be redirected to the specified `proxy`.
577577
578-
Currently the `proxy` option only handles HTTP requests, and it won’t proxy WebSocket connections.
578+
Currently the `proxy` option only handles HTTP requests, and it won’t proxy WebSocket connections.
579579
If the `proxy` option is **not** flexible enough for you, alternatively you can:
580580
581581
* Enable CORS on your server ([here’s how to do it for Express](http://enable-cors.org/server_expressjs.html)).
@@ -623,7 +623,7 @@ If you use a Node server, you can even share the route matching logic between th
623623
624624
## Running Tests
625625
626-
>Note: this feature is available with `[email protected]` and higher.
626+
>Note: this feature is available with `[email protected]` and higher.
627627
>[Read the migration guide to learn how to enable it in older projects!](https://github.com/facebookincubator/create-react-app/blob/master/CHANGELOG.md#migrating-from-023-to-030)
628628
629629
Create React App uses [Jest](https://facebook.github.io/jest/) as its test runner. To prepare for this integration, we did a [major revamp](https://facebook.github.io/jest/blog/2016/09/01/jest-15.html) of Jest so if you heard bad things about it years ago, give it another try.
@@ -677,7 +677,7 @@ it('sums numbers', () => {
677677
});
678678
```
679679
680-
All `expect()` matchers supported by Jest are [extensively documented here](http://facebook.github.io/jest/docs/api.html#expect-value).
680+
All `expect()` matchers supported by Jest are [extensively documented here](http://facebook.github.io/jest/docs/api.html#expect-value).
681681
You can also use [`jest.fn()` and `expect(fn).toBeCalled()`](http://facebook.github.io/jest/docs/api.html#tobecalled) to create “spies” or mock functions.
682682
683683
### Testing Components
@@ -717,7 +717,7 @@ it('renders without crashing', () => {
717717
});
718718
```
719719
720-
Unlike the previous smoke test using `ReactDOM.render()`, this test only renders `<App>` and doesn’t go deeper. For example, even if `<App>` itself renders a `<Button>` that throws, this test will pass. Shallow rendering is great for isolated unit tests, but you may still want to create some full rendering tests to ensure the components integrate correctly. Enzyme supports [full rendering with `mount()`](http://airbnb.io/enzyme/docs/api/mount.html), and you can also use it for testing state changes and component lifecyle.
720+
Unlike the previous smoke test using `ReactDOM.render()`, this test only renders `<App>` and doesn’t go deeper. For example, even if `<App>` itself renders a `<Button>` that throws, this test will pass. Shallow rendering is great for isolated unit tests, but you may still want to create some full rendering tests to ensure the components integrate correctly. Enzyme supports [full rendering with `mount()`](http://airbnb.io/enzyme/docs/api/mount.html), and you can also use it for testing state changes and component lifecycle.
721721
722722
You can read the [Enzyme documentation](http://airbnb.io/enzyme/) for more testing techniques. Enzyme documentation uses Chai and Sinon for assertions but you don’t have to use them because Jest provides built-in `expect()` and `jest.fn()` for spies.
723723
@@ -736,8 +736,8 @@ it('renders welcome message', () => {
736736
});
737737
```
738738
739-
All Jest matchers are [extensively documented here](http://facebook.github.io/jest/docs/api.html#expect-value).
740-
Nevertheless you can use a third-party assertion library like Chai if you want to, as described below.
739+
All Jest matchers are [extensively documented here](http://facebook.github.io/jest/docs/api.html#expect-value).
740+
Nevertheless you can use a third-party assertion library like [Chai](http://chaijs.com/) if you want to, as described below.
741741
742742
### Using Third Party Assertion Libraries
743743
@@ -772,12 +772,12 @@ global.localStorage = localStorageMock
772772
773773
### Focusing and Excluding Tests
774774
775-
You can replace `it()` with `xit()` to temporarily exclude a test from being executed.
775+
You can replace `it()` with `xit()` to temporarily exclude a test from being executed.
776776
Similarly, `fit()` lets you focus on a specific test without running any other tests.
777777
778778
### Coverage Reporting
779779
780-
Jest has an integrated coverage reporter that works well with ES6 and requires no configuration.
780+
Jest has an integrated coverage reporter that works well with ES6 and requires no configuration.
781781
Run `npm test -- --coverage` (note extra `--` in the middle) to include a coverage report like this:
782782
783783
![coverage report](http://i.imgur.com/5bFhnTS.png)
@@ -791,7 +791,7 @@ By default `npm test` runs the watcher with interactive CLI. However, you can fo
791791
### On CI servers
792792
#### Travis CI
793793
794-
1. Following the [Travis Getting started](https://docs.travis-ci.com/user/getting-started/) guide for syncing your Github repository with Travis. You may need to initialize some settings manually in your [profile](https://travis-ci.org/profile) page.
794+
1. Following the [Travis Getting started](https://docs.travis-ci.com/user/getting-started/) guide for syncing your GitHub repository with Travis. You may need to initialize some settings manually in your [profile](https://travis-ci.org/profile) page.
795795
1. Add a `.travis.yml` file to your git repository.
796796
```
797797
language: node_js
@@ -838,7 +838,7 @@ By default, the `package.json` of the generated project looks like this:
838838
}
839839
```
840840
841-
If you know that none of your tests depend on [jsdom](https://github.com/tmpvar/jsdom), you can safely remove `--env=jsdom`, and your tests will run faster.
841+
If you know that none of your tests depend on [jsdom](https://github.com/tmpvar/jsdom), you can safely remove `--env=jsdom`, and your tests will run faster.
842842
To help you make up your mind, here is a list of APIs that **need jsdom**:
843843
844844
* Any browser globals like `window` and `document`
@@ -863,7 +863,7 @@ This feature is experimental and still [has major usage issues](https://github.c
863863
864864
## Building for Relative Paths
865865
866-
By default, Create React App produces a build assuming your app is hosted at the server root.
866+
By default, Create React App produces a build assuming your app is hosted at the server root.
867867
To override this, specify the `homepage` in your `package.json`, for example:
868868
869869
```js
@@ -882,7 +882,7 @@ Open your `package.json` and add a `homepage` field:
882882
"homepage": "http://myusername.github.io/my-app",
883883
```
884884
885-
**The above step is important!**
885+
**The above step is important!**
886886
Create React App uses the `homepage` field to determine the root URL in the built HTML file.
887887
888888
Now, whenever you run `npm run build`, you will see a cheat sheet with a sequence of commands to deploy to GitHub pages:
@@ -905,7 +905,7 @@ Note that GitHub Pages doesn't support routers that use the HTML5 `pushState` hi
905905
906906
### Heroku
907907
908-
Use the [Heroku Buildpack for Create React App](https://github.com/mars/create-react-app-buildpack).
908+
Use the [Heroku Buildpack for Create React App](https://github.com/mars/create-react-app-buildpack).
909909
You can find instructions in [Deploying React with Zero Configuration](https://blog.heroku.com/deploying-react-with-zero-configuration).
910910
911911
### Modulus
@@ -964,7 +964,7 @@ Install the Surge CLI if you haven't already by running `npm install -g surge`.
964964
Success! Project is published and running at create-react-app.surge.sh
965965
```
966966
967-
Note that in order to support routers that use html5 `pushState` API, you may want to rename the `index.html` in your build folder to `200.html` before deploying to Surge. This [ensures that every URL falls back to that file](https://surge.sh/help/adding-a-200-page-for-client-side-routing).
967+
Note that in order to support routers that use HTML5 `pushState` API, you may want to rename the `index.html` in your build folder to `200.html` before deploying to Surge. This [ensures that every URL falls back to that file](https://surge.sh/help/adding-a-200-page-for-client-side-routing).
968968
969969
## Something Missing?
970970

0 commit comments

Comments
 (0)