Skip to content

Commit cceef7c

Browse files
committed
[Docs] Fix typos
1 parent 885afc3 commit cceef7c

22 files changed

+40
-40
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2673,7 +2673,7 @@ React ([#1073][] @jomasti)
26732673
### Fixed
26742674
* Fix [`jsx-closing-bracket-location`][] fixer ([#533][] @dtinth)
26752675
* Fix [`require-render-return`][] to only check valid render methods ([#563][])
2676-
* Fix detection to allow simple `this` usage in fonctional components ([#576][])
2676+
* Fix detection to allow simple `this` usage in functional components ([#576][])
26772677
* Fix [`forbid-prop-types`][] crash ([#579][])
26782678
* Fix comment handling in [`jsx-curly-spacing`][] ([#584][])
26792679

@@ -3693,7 +3693,7 @@ If you're still not using React 15 you can keep the old behavior by setting the
36933693
* Add [`jsx-uses-react`][] rule ([#6][] @glenjamin)
36943694

36953695
### Changed
3696-
* Update [`prop-types`][] to check props usage insead of propTypes presence ([#4][])
3696+
* Update [`prop-types`][] to check props usage instead of propTypes presence ([#4][])
36973697

36983698
[1.4.0]: https://github.com/jsx-eslint/eslint-plugin-react/compare/v1.3.0...v1.4.0
36993699
[#4]: https://github.com/jsx-eslint/eslint-plugin-react/issues/4

docs/rules/jsx-props-no-spreading.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Examples of **incorrect** code for this rule, when `custom` is set to `ignore`:
6868

6969
### explicitSpread
7070

71-
`explicitSpread` set to `ignore` will ignore spread operators that are explicilty listing all object properties within that spread. Default is set to `enforce`.
71+
`explicitSpread` set to `ignore` will ignore spread operators that are explicitly listing all object properties within that spread. Default is set to `enforce`.
7272

7373
Examples of **correct** code for this rule, when `explicitSpread` is set to `ignore`:
7474

docs/rules/no-arrow-function-lifecycle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
🔧 This rule is automatically fixable using the `--fix` [flag](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) on the command line.
44

5-
It is not neccessary to use arrow function for lifecycle methods. This makes things harder to test, conceptually less performant (although in practice, performance will not be affected, since most engines will optimize efficiently), and can break hot reloading patterns.
5+
It is not necessary to use arrow function for lifecycle methods. This makes things harder to test, conceptually less performant (although in practice, performance will not be affected, since most engines will optimize efficiently), and can break hot reloading patterns.
66

77
## Rule Details
88

docs/rules/no-unstable-nested-components.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Creating components inside components without memoization leads to unstable components. The nested component and all its children are recreated during each re-render. Given stateful children of the nested component will lose their state on each re-render.
44

5-
React reconcilation performs element type comparison with [reference equality](https://github.com/facebook/react/blob/v16.13.1/packages/react-reconciler/src/ReactChildFiber.js#L407). The reference to the same element changes on each re-render when defining components inside the render block. This leads to complete recreation of the current node and all its children. As a result the virtual DOM has to do extra unnecessary work and [possible bugs are introduced](https://codepen.io/ariperkkio/pen/vYLodLB).
5+
React reconciliation performs element type comparison with [reference equality](https://github.com/facebook/react/blob/v16.13.1/packages/react-reconciler/src/ReactChildFiber.js#L407). The reference to the same element changes on each re-render when defining components inside the render block. This leads to complete recreation of the current node and all its children. As a result the virtual DOM has to do extra unnecessary work and [possible bugs are introduced](https://codepen.io/ariperkkio/pen/vYLodLB).
66

77
## Rule Details
88

docs/rules/sort-prop-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Enforce propTypes declarations alphabetical sorting (react/sort-prop-types)
22

3-
Some developers prefer to sort prop type declaratioms alphabetically to be able to find necessary declaration easier at the later time. Others feel that it adds complexity and becomes burden to maintain.
3+
Some developers prefer to sort prop type declarations alphabetically to be able to find necessary declaration easier at the later time. Others feel that it adds complexity and becomes burden to maintain.
44

55
## Rule Details
66

lib/rules/jsx-curly-brace-presence.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ module.exports = {
138138
)).join(HTML_ENTITY);
139139

140140
const htmlEntities = text.match(HTML_ENTITY_REGEX());
141-
return htmlEntities.reduce((acc, htmlEntitiy) => (
142-
acc.replace(HTML_ENTITY, htmlEntitiy)
141+
return htmlEntities.reduce((acc, htmlEntity) => (
142+
acc.replace(HTML_ENTITY, htmlEntity)
143143
), withCurlyBraces);
144144
}
145145

@@ -244,8 +244,8 @@ module.exports = {
244244
}
245245

246246
// Bail out if there is any character that needs to be escaped in JSX
247-
// because escaping decreases readiblity and the original code may be more
248-
// readible anyway or intentional for other specific reasons
247+
// because escaping decreases readability and the original code may be more
248+
// readable anyway or intentional for other specific reasons
249249
function lintUnnecessaryCurly(JSXExpressionNode) {
250250
const expression = JSXExpressionNode.expression;
251251
const expressionType = expression.type;

lib/rules/no-access-state-in-setstate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ module.exports = {
130130
break;
131131
}
132132

133-
// Storing all variables containg this.state
133+
// Storing all variables containing this.state
134134
if (current.type === 'VariableDeclarator') {
135135
vars.push({
136136
node,

lib/rules/no-danger.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const DANGEROUS_PROPERTIES = fromEntries(DANGEROUS_PROPERTY_NAMES.map((prop) =>
2929
/**
3030
* Checks if a JSX attribute is dangerous.
3131
* @param {String} name - Name of the attribute to check.
32-
* @returns {boolean} Whether or not the attribute is dnagerous.
32+
* @returns {boolean} Whether or not the attribute is dangerous.
3333
*/
3434
function isDangerous(name) {
3535
return has(DANGEROUS_PROPERTIES, name);

lib/rules/no-direct-mutation-state.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module.exports = {
5656
}
5757

5858
/**
59-
* Walks throughs the MemberExpression to the top-most property.
59+
* Walks through the MemberExpression to the top-most property.
6060
* @param {Object} node The node to process
6161
* @returns {Object} The outer-most MemberExpression
6262
*/

lib/rules/no-unescaped-entities.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ module.exports = {
8181
const configuration = context.options[0] || {};
8282
const entities = configuration.forbid || DEFAULTS;
8383

84-
// HTML entites are already escaped in node.value (as well as node.raw),
84+
// HTML entities are already escaped in node.value (as well as node.raw),
8585
// so pull the raw text from context.getSourceCode()
8686
for (let i = node.loc.start.line; i <= node.loc.end.line; i++) {
8787
let rawLine = context.getSourceCode().lines[i - 1];

0 commit comments

Comments
 (0)