Skip to content

Commit 30b4710

Browse files
authored
Fix spelling errors and typos (#19138)
1 parent 655affa commit 30b4710

73 files changed

Lines changed: 281 additions & 279 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect".
1313
7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
1414
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files.
15-
9. Run the [Flow](https://flowtype.org/) typechecks (`yarn flow`).
15+
9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
1616
10. If you haven't already, complete the CLA.
1717
1818
Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html

fixtures/dom/src/components/fixtures/hydration/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class Hydration extends React.Component {
105105
Version:
106106
<VersionPicker
107107
id="hydration_version"
108-
name="hyration_version"
108+
name="hydration_version"
109109
version={version}
110110
onChange={this.setVersion}
111111
/>

fixtures/tracing/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ <h3>
6565

6666
<script>
6767
if (window.location.search.includes('puppeteer=true')) {
68-
// Colocated calls to performance.now() often yield different values in Puppeteer.
68+
// Collocated calls to performance.now() often yield different values in Puppeteer.
6969
// This causes the Scheduler API test to fail.
7070
// For the purposes of our automated release scripts,
7171
// Coerce tests to use Date.now() instead to reduce the chances of a false positive.

packages/eslint-plugin-react-hooks/src/RulesOfHooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ export default {
536536
* easy. For anonymous function expressions it is much harder. If you search for
537537
* `IsAnonymousFunctionDefinition()` in the ECMAScript spec you'll find places
538538
* where JS gives anonymous function expressions names. We roughly detect the
539-
* same AST nodes with some exceptions to better fit our usecase.
539+
* same AST nodes with some exceptions to better fit our use case.
540540
*/
541541

542542
function getFunctionName(node) {

packages/react-devtools-core/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Be sure to run this function *before* importing e.g. `react`, `react-dom`, `reac
2121
The `config` object may contain:
2222
* `host: string` (defaults to "localhost") - Websocket will connect to this host.
2323
* `port: number` (defaults to `8097`) - Websocket will connect to this port.
24-
* `websocket: Websocket` - Custom websocked to use. Overrides `host` and `port` settings if provided.
24+
* `websocket: Websocket` - Custom websocket to use. Overrides `host` and `port` settings if provided.
2525
* `resolveRNStyle: (style: number) => ?Object` - Used by the React Native style plug-in.
2626
* `isAppActive: () => boolean` - If provided, DevTools will poll this method and wait until it returns true before connecting to React.
2727

@@ -50,4 +50,4 @@ yarn start:backend
5050
Watch for changes made to the standalone UI entry point and rebuild:
5151
```sh
5252
yarn start:standalone
53-
```
53+
```

packages/react-devtools-extensions/src/renderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* In order to support reload-and-profile functionality, the renderer needs to be injected before any other scripts.
33
* Since it is a complex file (with imports) we can't just toString() it like we do with the hook itself,
4-
* So this entry point (one of the web_accessible_resources) provcides a way to eagerly inject it.
4+
* So this entry point (one of the web_accessible_resources) provides a way to eagerly inject it.
55
* The hook will look for the presence of a global __REACT_DEVTOOLS_ATTACH__ and attach an injected renderer early.
66
* The normal case (not a reload-and-profile) will not make use of this entry point though.
77
*

packages/react-devtools-inline/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ initializeBackend(contentWindow);
8585

8686
// React application can be injected into <iframe> at any time now...
8787
// Note that this would need to be done via <script> tag injection,
88-
// as setting the src of the <iframe> would load a new page (withou the injected backend).
88+
// as setting the src of the <iframe> would load a new page (without the injected backend).
8989

9090
// Initialize DevTools UI to listen to the hook we just installed.
9191
// This returns a React component we can render anywhere in the parent window.
@@ -107,7 +107,7 @@ Sandboxed `iframe`s are also supported but require more complex initialization.
107107
```js
108108
import { activate, initialize } from "react-devtools-inline/backend";
109109

110-
// The DevTooks hook needs to be installed before React is even required!
110+
// The DevTools hook needs to be installed before React is even required!
111111
// The safest way to do this is probably to install it in a separate script tag.
112112
initialize(window);
113113

@@ -177,4 +177,4 @@ Once the above packages have been built or downloaded, you can watch for changes
177177
yarn start
178178
```
179179

180-
To test package changes, refer to the [`react-devtools-shell` README](https://github.com/facebook/react/blob/master/packages/react-devtools-shell/README.md).
180+
To test package changes, refer to the [`react-devtools-shell` README](https://github.com/facebook/react/blob/master/packages/react-devtools-shell/README.md).

packages/react-devtools-shared/src/__tests__/setupTests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ env.beforeEach(() => {
2121
// it's too late for a test to mock the clipboard-js modules.
2222
jest.mock('clipboard-js', () => ({copy: global.mockClipboardCopy}));
2323

24-
// These files should be required (and re-reuired) before each test,
24+
// These files should be required (and re-required) before each test,
2525
// rather than imported at the head of the module.
2626
// That's because we reset modules between tests,
2727
// which disconnects the DevTool's cache from the current dispatcher ref.

packages/react-devtools-shared/src/__tests__/store-test.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -867,19 +867,19 @@ describe('Store', () => {
867867
}
868868

869869
const MyComponent = (props, ref) => null;
870-
const FowardRefComponent = React.forwardRef(MyComponent);
870+
const ForwardRefComponent = React.forwardRef(MyComponent);
871871
const MyComponent2 = (props, ref) => null;
872-
const FowardRefComponentWithAnonymousFunction = React.forwardRef(() => (
872+
const ForwardRefComponentWithAnonymousFunction = React.forwardRef(() => (
873873
<MyComponent2 />
874874
));
875875
const MyComponent3 = (props, ref) => null;
876-
const FowardRefComponentWithCustomDisplayName = React.forwardRef(
876+
const ForwardRefComponentWithCustomDisplayName = React.forwardRef(
877877
MyComponent3,
878878
);
879-
FowardRefComponentWithCustomDisplayName.displayName = 'Custom';
879+
ForwardRefComponentWithCustomDisplayName.displayName = 'Custom';
880880
const MyComponent4 = (props, ref) => null;
881881
const MemoComponent = React.memo(MyComponent4);
882-
const MemoForwardRefComponent = React.memo(FowardRefComponent);
882+
const MemoForwardRefComponent = React.memo(ForwardRefComponent);
883883
const MyComponent5 = (props, ref) => null;
884884
const LazyComponent = React.lazy(() => fakeImport(MyComponent5));
885885

@@ -896,9 +896,9 @@ describe('Store', () => {
896896
const App = () => (
897897
<React.Fragment>
898898
<MyComponent />
899-
<FowardRefComponent />
900-
<FowardRefComponentWithAnonymousFunction />
901-
<FowardRefComponentWithCustomDisplayName />
899+
<ForwardRefComponent />
900+
<ForwardRefComponentWithAnonymousFunction />
901+
<ForwardRefComponentWithCustomDisplayName />
902902
<MemoComponent />
903903
<MemoForwardRefComponent />
904904
<React.Suspense fallback="Loading...">

packages/react-devtools-shared/src/__tests__/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export async function actAsync(
4141
const {act: actTestRenderer} = require('react-test-renderer');
4242
const {act: actDOM} = require('react-dom/test-utils');
4343

44-
// $FlowFixMe Flow doens't know about "await act()" yet
44+
// $FlowFixMe Flow doesn't know about "await act()" yet
4545
await actDOM(async () => {
4646
await actTestRenderer(async () => {
4747
await cb();
@@ -50,7 +50,7 @@ export async function actAsync(
5050

5151
if (recursivelyFlush) {
5252
while (jest.getTimerCount() > 0) {
53-
// $FlowFixMe Flow doens't know about "await act()" yet
53+
// $FlowFixMe Flow doesn't know about "await act()" yet
5454
await actDOM(async () => {
5555
await actTestRenderer(async () => {
5656
jest.runAllTimers();

0 commit comments

Comments
 (0)