Skip to content

Latest commit

 

History

History
49 lines (29 loc) · 1.86 KB

README.md

File metadata and controls

49 lines (29 loc) · 1.86 KB

jQueryDeprecatedAutoFix

The app updates obsolete jQuery code usage to recommended alternatives. Currently, it resolves the following errors:

  • jQuery.isFunction() is deprecated
  • jQuery.isArray is deprecated; use Array.isArray
  • jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos
  • jQuery.expr.filters is deprecated; use jQuery.expr.pseudos
  • jQuery.fn.click() event shorthand is deprecated
  • jQuery.fn.delegate() is deprecated
  • jQuery.fn.focus() event shorthand is deprecated
  • jQuery.fn.mouseup() event shorthand is deprecated
  • jQuery.fn.blur() event shorthand is deprecated
  • jQuery.fn.bind() is deprecated
  • jQuery.fn.submit() event shorthand is deprecated
  • jQuery.fn.resize() event shorthand is deprecated

How to Use

  1. The app is an C# Console Application which needs to be compiled and executed. I use MonoDevelop (https://www.monodevelop.com/) but it can run on Visual Studio as well.

In this example, I will use MonoDevelop. You can download and install it.

  1. Open jQueryDeprecatedAutoFix.sln with MonoDevelop (or Visual Studio)

  2. Edit file paths in file:

jQueryDeprecatedAutoFix/jQueryDeprecatedAutoFix/Program.cs

image

inputFilePath should contain a valid path to a file you want to update.

outputFilePath should contain a valid path to a updated file location. I prefer it to be different than inputFilePath and then to compare both of the files.

  1. Compile the App and execute

image

  1. You will see logs in console i.e.

image

image