Skip to content

Commit 237baab

Browse files
edg2sjdforrester
authored andcommitted
Update deprecations rulesets (#120)
Added to 3.3: * `no-event-shorthand` * `no-is-numeric` * `no-now` * `no-proxy` * `no-type` Create a 3.2 ruleset: * `no-hold-ready` * `no-is-array` * `no-node-name` Fixes #117
1 parent 2e62391 commit 237baab

10 files changed

+34
-2
lines changed

docs/no-camel-case.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Disallows the $.camelCase utility.
44

5+
This rule is enabled in `plugin:no-jquery/deprecated-3.3`.
6+
57
## Rule details
68

79
✗ The following patterns are considered errors:

docs/no-event-shorthand.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Disallows the .error/resize/scroll/blur/change/focus/focusin/focusout/select/submit/keydown/keypress/keyup/click/contextmenu/dblclick/hover/mousedown/mouseenter/mouseleave/mousemove/mouseout/mouseover/mouseup/ajaxStart/ajaxStop/ajaxComplete/ajaxError/ajaxSuccess/ajaxSend methods.
44

5+
This rule is enabled in `plugin:no-jquery/deprecated-3.3`.
6+
57
## Rule details
68

79
✗ The following patterns are considered errors:

docs/no-hold-ready.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Disallows the $.holdReady utility.
44

5+
This rule is enabled in `plugin:no-jquery/deprecated-3.2`.
6+
57
## Rule details
68

79
✗ The following patterns are considered errors:

docs/no-is-array.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Disallows the $.isArray utility. Prefer Array.isArray to $.isArray.
44

5+
This rule is enabled in `plugin:no-jquery/deprecated-3.2`.
6+
57
## Rule details
68

79
✗ The following patterns are considered errors:

docs/no-is-numeric.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Disallows the $.isNumeric utility. Prefer typeof to $.isNumeric.
44

5+
This rule is enabled in `plugin:no-jquery/deprecated-3.3`.
6+
57
## Rule details
68

79
✗ The following patterns are considered errors:

docs/no-node-name.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Disallows the $.nodeName utility.
44

5+
This rule is enabled in `plugin:no-jquery/deprecated-3.2`.
6+
57
## Rule details
68

79
✗ The following patterns are considered errors:

docs/no-now.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Disallows the $.now utility. Prefer (new Date).getTime() to $.now.
44

5+
This rule is enabled in `plugin:no-jquery/deprecated-3.3`.
6+
57
## Rule details
68

79
✗ The following patterns are considered errors:

docs/no-proxy.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Disallows the $.proxy utility. Prefer Function#bind to $.proxy.
44

5+
This rule is enabled in `plugin:no-jquery/deprecated-3.3`.
6+
57
## Rule details
68

79
✗ The following patterns are considered errors:

docs/no-type.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Disallows the $.type utility. Prefer typeof/instanceof to $.type.
44

5+
This rule is enabled in `plugin:no-jquery/deprecated-3.3`.
6+
57
## Rule details
68

79
✗ The following patterns are considered errors:

index.js

+16-2
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,25 @@ module.exports = {
104104
},
105105
// Use this profile if you're writing code targetting jQuery 3.3.x environments.
106106
'deprecated-3.3': {
107-
extends: 'plugin:no-jquery/deprecated-3.0',
107+
extends: 'plugin:no-jquery/deprecated-3.2',
108108
rules: {
109109
'no-jquery/no-camel-case': 'error',
110+
'no-jquery/no-event-shorthand': 'error',
110111
'no-jquery/no-is-function': 'error',
111-
'no-jquery/no-is-window': 'error'
112+
'no-jquery/no-is-numeric': 'error',
113+
'no-jquery/no-is-window': 'error',
114+
'no-jquery/no-now': 'error',
115+
'no-jquery/no-proxy': 'error',
116+
'no-jquery/no-type': 'error'
117+
}
118+
},
119+
// Use this profile if you're writing code targetting jQuery 3.3.x environments.
120+
'deprecated-3.2': {
121+
extends: 'plugin:no-jquery/deprecated-3.0',
122+
rules: {
123+
'no-jquery/no-hold-ready': 'error',
124+
'no-jquery/no-is-array': 'error',
125+
'no-jquery/no-node-name': 'error'
112126
}
113127
},
114128
// Use this profile if you're writing code targetting jQuery 3.0.x environments.

0 commit comments

Comments
 (0)