Skip to content

Commit afe2943

Browse files
committed
Docs: Indicate which deprecated APIs are removed in 4.0; fix typos, etc.
1 parent 963add8 commit afe2943

File tree

8 files changed

+45
-34
lines changed

8 files changed

+45
-34
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
@@ -152,7 +152,7 @@ migratePatchFunc( jQuery.fn, "toggleClass", function( state ) {
152152

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

src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ window.console.log( "JQMIGRATE: Migrate is installed" +
2828

2929
var warnedAbout = {};
3030

31-
// By default each warning is only reported once.
31+
// By default, each warning is only reported once.
3232
jQuery.migrateDeduplicateWarnings = true;
3333

3434
// List of warnings already given; public read only
3535
jQuery.migrateWarnings = [];
3636

37-
// Set to false to disable traces that appear with warnings
37+
// Set to `false` to disable traces that appear with warnings
3838
if ( jQuery.migrateTrace === undefined ) {
3939
jQuery.migrateTrace = true;
4040
}

src/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export function camelCase( string ) {
66
} );
77
}
88

9-
// Insert an additional object in the prototype chain between `objrvy`
10-
// and `Object.prototype`; that intermediate object proxies properties
9+
// Make `object` inherit from `Object.prototype` via an additional object
10+
// in between; that intermediate object proxies properties
1111
// to `Object.prototype`, warning about their usage first.
1212
export function patchProto( object, options ) {
1313

test/data/test-utils.js

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

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

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

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

test/unit/jquery/css.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ QUnit[
147147
} );
148148

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

warnings.md

Lines changed: 31 additions & 23 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)