Skip to content

Commit b9f29f2

Browse files
authored
Docs: Fix typos, comments, etc.
Closes gh-607 Ref gh-606
1 parent 5b59e9d commit b9f29f2

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ charset = utf-8
1010
trim_trailing_whitespace = true
1111
insert_final_newline = true
1212

13-
[*.{yml}]
13+
[*.yml]
1414
indent_style = space
1515
indent_size = 2

src/disablePatches.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
var disabledPatches = Object.create( null );
44

55
// Don't apply patches for specified codes. Helpful for code bases
6-
// where some Migrate warnings have been addressed and it's desirable
6+
// where some Migrate warnings have been addressed, and it's desirable
77
// to avoid needless patches or false positives.
88
jQuery.migrateDisablePatches = function() {
99
var i;

src/jquery/attributes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ migratePatchFunc( jQuery.fn, "toggleClass", function( state ) {
110110

111111
// If the element has a class name or if we're passed `false`,
112112
// then remove the whole classname (if there was one, the above saved it).
113-
// Otherwise bring back whatever was previously saved (if anything),
113+
// Otherwise, bring back whatever was previously saved (if anything),
114114
// falling back to the empty string if nothing was stored.
115115
if ( this.setAttribute ) {
116116
this.setAttribute( "class",

test/data/test-utils.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@ window.expectMessage = function expectMessage( assert, name, expected, fn ) {
1717
if ( expected === 0 ) {
1818
assert.deepEqual( jQuery.migrateMessages, [], name + ": did not message" );
1919

20-
// Simple numeric equality assertion for messages matching an explicit count
20+
// Simple numeric equality assertion for messages matching an explicit
21+
// count
2122
} else if ( expected && jQuery.migrateMessages.length === expected ) {
2223
assert.equal( jQuery.migrateMessages.length, expected, name + ": messaged" );
2324

24-
// Simple ok assertion when we saw at least one message and weren't looking for an explict count
25+
// Simple ok assertion when we saw at least one message and weren't
26+
// looking for an explicit count
2527
} else if ( !expected && jQuery.migrateMessages.length ) {
2628
assert.ok( true, name + ": messaged" );
2729

28-
// Failure; use deepEqual to show the messages that *were* generated and the expectation
30+
// Failure; use deepEqual to show the messages that *were* generated
31+
// and the expectation
2932
} else {
3033
assert.deepEqual( jQuery.migrateMessages,
3134
"<messages: " + ( expected || "1+" ) + ">", name + ": messaged"

test/unit/jquery/css.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ QUnit[
120120
} );
121121

122122
// z-index is tested explicitly as raw jQuery 4.0 will not have `jQuery.cssNumber`
123-
// so iterating over it won't find anything and we'd like to ensure number values
123+
// so iterating over it won't find anything, and we'd like to ensure number values
124124
// are not warned against for safe CSS props like z-index (gh-438).
125125
expectNoMessage( assert, "z-index", function() {
126126
jQuery( "<div />" ).css( "z-index", 1 );

warnings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ This is _not_ a warning, but a console log message the plugin shows when it firs
4747

4848
### \[fx-interval\] JQMIGRATE: jQuery.fx.interval is removed
4949

50-
**Cause**: As of jQuery 4.0, the `jQuery.fx.interval` property is no longer consulted and it's no longer possible to change the animation interval on browsers that do not support the `window.requestAnimationFrame()` method.
50+
**Cause**: As of jQuery 4.0, the `jQuery.fx.interval` property is no longer consulted, and it's no longer possible to change the animation interval on browsers that do not support the `window.requestAnimationFrame()` method.
5151

5252
**Solution**: Find and remove code that changes or uses `jQuery.fx.interval`. If the value is being used by code in your page or a plugin, the code may be making assumptions that are no longer valid. The default value of `jQuery.fx.interval` is `13` (milliseconds), which could be used instead of accessing this property.
5353

@@ -98,7 +98,7 @@ This is _not_ a warning, but a console log message the plugin shows when it firs
9898

9999
### \[toggleClass-bool\] JQMIGRATE: `jQuery.fn.toggleClass( \[ boolean \] ) is removed`
100100

101-
**Cause:** Calling `.toggleClass()` with no arguments, or with a single Boolean `true` or `false` argument, has been deprecated. Its behavior was poorly documented, but essentially the method saved away the current `class` value in a data item when the class was removed and restored the saved value when it was toggled back. If you do not believe you are specificially trying to use this form of the method, it is possible you are accidentally doing so via an inadvertent undefined value, as `.toggleClass( undefined )` toggles all classes.
101+
**Cause:** Calling `.toggleClass()` with no arguments, or with a single Boolean `true` or `false` argument, has been deprecated. Its behavior was poorly documented, but essentially the method saved away the current `class` value in a data item when the class was removed and restored the saved value when it was toggled back. If you do not believe you are specifically trying to use this form of the method, it is possible you are accidentally doing so via an inadvertent undefined value, as `.toggleClass( undefined )` toggles all classes.
102102

103103
**Solution:** If this functionality is still needed, save the current full `.attr( "class" )` value in a data item and restore it when required.
104104

0 commit comments

Comments
 (0)