eslint-plugin-no-jquery 2.7.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +2 -2
  2. package/README.md.template +1 -1
  3. package/package.json +12 -9
  4. package/src/.eslintrc.js +17 -0
  5. package/src/all-methods.js +2 -1
  6. package/src/index.js +4 -1
  7. package/src/rules/no-ajax-events.js +26 -28
  8. package/src/rules/no-ajax.js +1 -1
  9. package/src/rules/no-and-self.js +1 -3
  10. package/src/rules/no-animate-toggle.js +3 -3
  11. package/src/rules/no-animate.js +28 -30
  12. package/src/rules/no-append-html.js +18 -20
  13. package/src/rules/no-class-state.js +16 -18
  14. package/src/rules/no-class.js +1 -1
  15. package/src/rules/no-constructor-attributes.js +21 -23
  16. package/src/rules/no-data.js +1 -1
  17. package/src/rules/no-deferred.js +2 -2
  18. package/src/rules/no-error.js +1 -3
  19. package/src/rules/no-escape-selector.js +1 -3
  20. package/src/rules/no-event-shorthand.js +3 -3
  21. package/src/rules/no-extend.js +28 -26
  22. package/src/rules/no-fade.js +1 -1
  23. package/src/rules/no-fx-interval.js +13 -15
  24. package/src/rules/no-global-selector.js +39 -41
  25. package/src/rules/no-is-array.js +1 -3
  26. package/src/rules/no-is-function.js +1 -1
  27. package/src/rules/no-jquery-constructor.js +13 -15
  28. package/src/rules/no-load-shorthand.js +17 -19
  29. package/src/rules/no-noop.js +1 -3
  30. package/src/rules/no-now.js +1 -3
  31. package/src/rules/no-on-ready.js +29 -34
  32. package/src/rules/no-other-methods.js +19 -21
  33. package/src/rules/no-other-utils.js +18 -20
  34. package/src/rules/no-parse-html-literal.js +60 -67
  35. package/src/rules/no-parse-json.js +1 -3
  36. package/src/rules/no-parse-xml.js +1 -1
  37. package/src/rules/no-prop.js +1 -1
  38. package/src/rules/no-proxy.js +1 -1
  39. package/src/rules/no-ready-shorthand.js +1 -1
  40. package/src/rules/no-ready.js +9 -11
  41. package/src/rules/no-serialize.js +1 -1
  42. package/src/rules/no-size.js +1 -3
  43. package/src/rules/no-sizzle.js +5 -5
  44. package/src/rules/no-slide.js +1 -1
  45. package/src/rules/no-unique.js +1 -3
  46. package/src/rules/no-visibility.js +1 -1
  47. package/src/rules/no-wrap.js +1 -1
  48. package/src/rules/variable-pattern.js +4 -4
  49. package/src/utils.js +107 -117
  50. package/Changelog.md +0 -359
package/Changelog.md DELETED
@@ -1,359 +0,0 @@
1
- # eslint-plugin-no-jquery release history
2
-
3
- ## v2.7.0
4
- * New rule: `no-append-html` (#284) (Ed Sanders)
5
- * New config: Allow rules to disable get/set separately, starting with no-html (Ed Sanders)
6
- * Deprecated rule: `no-submit`; use `no-event-shorthand` (Ed Sanders)
7
-
8
-
9
- * Code: Sort ajax events consistently and alphabetically. (Ed Sanders)
10
- * Code: utils.isjQuery: Improve `Identifier` detection (#283) (Ed Sanders)
11
-
12
-
13
- * Docs: Update eslint-docgen to 0.5.1 (#290) (Ed Sanders)
14
- * Docs: Show which rules have options, and which are fixable in README (#289) (Ed Sanders)
15
- * Docs: Fix test links (#280) (Ed Sanders)
16
-
17
-
18
- * Release: Update devDependencies (#278) (Ed Sanders)
19
-
20
- ## v2.6.0
21
- * New rule: `no-escape-selector` for `$.escapeSelector` util (Ed Sanders)
22
- * New config: `deprecated-3.6` for new jQuery release (Ed Sanders)
23
-
24
-
25
- * Rule fix: Add fixer for `no-on-ready` (Ed Sanders)
26
- * Rule fix: Add fixer for `no-ready-shorthand` (Ed Sanders)
27
- * Rule fix: Add fixer for `no-error` (Ed Sanders)
28
- * Rule fix: Add fixer for `no-parse-xml` (Ed Sanders)
29
- * Rule fix: Add fixer for `no-parse-html-literal` tag style (Ed Sanders)
30
- * Rule fix: `no-now`; recommend `Date.now` rather than `(new Date).getTime()` (Ed Sanders)
31
-
32
-
33
- * Code: Add real arguments to `no-parse-html` tests (Ed Sanders)
34
- * Code: codecov.yaml: Remove extra linebreak (Ed Sanders)
35
- * Release: Update devDependencies (#266) (Ed Sanders)
36
-
37
-
38
- ## v2.5.0
39
-
40
- * New config: `recommended` just includes `variable-pattern` rule (Ed Sanders)
41
- * New config: `all` covers all usages of jQuery methods and utils (Ed Sanders)
42
- * New config: Create a `deprecated-X.X` config for every minor release (Ed Sanders)
43
- * Configs: Use 'warn' instead of 'error' in `deprecated-X` and `all` configs (Ed Sanders)
44
- * New rule: `no-jquery-constructor` (Ed Sanders)
45
-
46
-
47
- * Code: Add `reporthtml` coverage script (Ed Sanders)
48
- * Code: Remove unnecessary constants (Ed Sanders)
49
- * Code: Replace `Array#indexOf` with `Array#includes` (Ed Sanders)
50
- * Code: Only assert error message strings (Ed Sanders)
51
- * Code: Introduce eslint-plugin-eslint-plugin (Ed Sanders)
52
- * Code: Add ESLint 7.0.0 support (Ed Sanders)
53
- * Code: Prefer `$("div")` in test cases (Ed Sanders)
54
- * Code: Fix ESLint 2.3.0 support (Ed Sanders)
55
-
56
-
57
- * Docs: Document and test the `slim` config (Ed Sanders)
58
- * Docs: Move docs to docs/rules (Ed Sanders)
59
- * Docs: Suppress more examples with noDoc (no-parse-html-literal) (Ed Sanders)
60
- * Docs: Update to eslint-docgen 0.3.1 (Ed Sanders)
61
- * Docs: Suppress some examples with noDoc in long documentation files (Ed Sanders)
62
- * Docs: Use eslint-docgen (Ed Sanders)
63
- * Docs: Remove noDoc arg from RuleTesterAndDocs, just use RuleTester (Ed Sanders)
64
- * Docs: Fetch 'main' path from package.json (Ed Sanders)
65
- * Docs: Remove extra linebreak from no-parse-html-literal.md (Ed Sanders)
66
- * Docs: Add missing linebreak before rule source section (Ed Sanders)
67
- * Docs: Improvements to doc builder (Ed Sanders)
68
-
69
-
70
- * Release: Update devDependencies (Ed Sanders)
71
-
72
- ## v2.4.1
73
-
74
- * Config fix: Fix override of `no-event-shorthand` in `deprecated-3.5` (Ed Sanders)
75
-
76
-
77
- * Code: Add real test coverage for index.js (Ed Sanders)
78
- * Code: gitignore coverage.lcov (Ed Sanders)
79
-
80
- ## v2.4.0
81
-
82
- * New feature: Add specification of plugin return types to settings (Ed Sanders)
83
-
84
-
85
- * New config: Add new `deprecated-3.5` config (Ed Sanders)
86
-
87
-
88
- * New rule: `no-find-collection`, split out of `no-find` (Ed Sanders)
89
- * New rule: `no-find-util`, split out of `no-find` (Ed Sanders)
90
-
91
-
92
- * Rule fix: Set all rules to type: `suggestion` (Ed Sanders)
93
- * Rule fix: `no-global-selector`; add `allowIds` option to allow global selector by ID (Adam Roses Wight)
94
- * Rule fix: `no-event-shorthand`; add `allowAjaxEvents` option and use in `deprecated-3.3` (Ed Sanders)
95
-
96
-
97
- * Docs: Avoid duplicating name in "Prefer..." sentence (Ed Sanders)
98
- * Docs: Build lists in README.md automatically (Ed Sanders)
99
- * Docs: Consistently use `.methodOrProp` with collections, not `$.methodOrProp` (Ed Sanders)
100
- * Docs: Link to jQuery documentation for each method/util/property (Ed Sanders)
101
- * Docs: Show ruleset information in README (Ed Sanders)
102
-
103
-
104
- * Release: State "MIT license" in LICENSE header (Ed Sanders)
105
- * Release: Update devDependencies (Ed Sanders)
106
-
107
-
108
- * Code: Add `#odd` and `#even` to all methods lists, new in jQuery 3.5 (Ed Sanders)
109
- * Code: Add code coverage checks using Istanbul (Ed Sanders)
110
- * Code: Move index.js to src/ (Ed Sanders)
111
- * Code: Restructure files and folders (Ed Sanders)
112
- * Code: Setup codecov GitHub Action integration (Ed Sanders)
113
-
114
-
115
- ## v2.3.2
116
-
117
- * Rule fix: Add fixer for `no-is-function` (Ed Sanders)
118
- * Rule fix: Follow-up #186: Actually merge `no-undelegate` into `no-delegate` (Ed Sanders)
119
-
120
-
121
- * Docs: Soften and make clearer the language for `no-class-state` (James D. Forrester)
122
- * Docs: Explain `no-global-selector` restriction more clearly (James D. Forrester)
123
-
124
-
125
- * Release: Update devDependencies (Ed Sanders)
126
-
127
-
128
- * Code: Remove non-existent $.fn.parse from tests (Ed Sanders)
129
-
130
-
131
- ## v2.3.1
132
- * New feature: Show deprecation message in linting errors (Ed Sanders)
133
-
134
-
135
- * Deprecated rule: `no-die`; use `no-live` (Ed Sanders)
136
- * Deprecated rule: `no-unbind`; use `no-bind` (Ed Sanders)
137
- * Deprecated rule: `no-undelegate`; use `no-delegate` (Ed Sanders)
138
-
139
-
140
- * Rule fix: Remove `load` from `no-event-shorthand` (Ed Sanders)
141
-
142
-
143
- * Docs: Build generic "Prefer" messages for docs when node===true (Ed Sanders)
144
- * Docs: Escape all code snippets (Ed Sanders)
145
- * Docs: Monospace rule names (Ed Sanders)
146
-
147
-
148
- * Release: Add icons to readme section headings (Ed Sanders)
149
- * Release: Fix Changelog markdown list spacing (Ed Sanders)
150
- * Release: Use a limited ruleset for lint-fixing documentation snippets (Ed Sanders)
151
-
152
-
153
- * Code: Add `triggerHandler` to `nonCollectionReturningMethods` (Ed Sanders)
154
- * Code: Check documentation in CI (Ed Sanders)
155
- * Code: Check rules are listed in README.md & index.js (Ed Sanders)
156
- * Code: Migrate from Travis to GitHub Actions (James D. Forrester)
157
- * Code: Remove incorrect TODO comment (Ed Sanders)
158
-
159
-
160
- ## v2.3.0
161
- * New rule: `variable-pattern` (Ed Sanders)
162
- * New rule: `no-parse-xml` (Ed Sanders)
163
- * New rule: `no-visibility` as a group alias for `no-show`, `no-hide`, & `no-toggle` (Ed Sanders)
164
-
165
-
166
- * New config: `slim` as a config for users of the jQuery slim build (Ed Sanders)
167
-
168
-
169
- * Deprecated rule: `no-show` (Ed Sanders)
170
- * Deprecated rule: `no-hide` (Ed Sanders)
171
- * Deprecated rule: `no-toggle` (Ed Sanders)
172
-
173
-
174
- * Rule fix: Add `allowDeep` options to `no-extend` (Ed Sanders)
175
- * Rule fix: Add `hasData` method to `no-data` rule (Ed Sanders)
176
- * Rule fix: Enforce single tag style in `no-parse-html-literal` (Ed Sanders)
177
-
178
-
179
- * New fixer: Add fixer for `no-event-shorthand` and similar (Ed Sanders)
180
- * New fixer: Add fixer for `no-noop` (Ed Sanders)
181
- * New fixer: Add fixer for `no-now` (Ed Sanders)
182
- * New fixer: Add fixer for `no-size` (Ed Sanders)
183
-
184
-
185
- * Docs: Link to each rule's definition (Ed Sanders)
186
- * Docs: Switch `constructorAliases`/`variablePattern` in README (Ed Sanders)
187
- * Docs: Pad fixer examples so they align (Ed Sanders)
188
- * Docs: Output example fixes in documentation (Ed Sanders)
189
-
190
-
191
- * Release: Update LICENSE authors (Ed Sanders)
192
-
193
-
194
- * Code: Add `npm run testpath` for running a single test (Ed Sanders)
195
- * Code: Add a test that automatically captures all rules (Ed Sanders)
196
- * Code: Avoid `key in object` lookup (Ed Sanders)
197
- * Code: Improvements to collection return detection (Ed Sanders)
198
- * Code: More fixes to jQuery method return types (Ed Sanders)
199
- * Code: Rename .eslintrc to .eslintrc.json (Ed Sanders)
200
- * Code: Update eslint-config-wikimedia (Ed Sanders)
201
-
202
-
203
- ## v2.2.1
204
- * Release: Update index.js and README with missing rules (Ed Sanders)
205
-
206
-
207
- ## v2.2.0
208
- * New rule: `no-camel-case` (Christophe Coevoet)
209
- * New rule: `no-constructor-attributes` (Ed Sanders)
210
- * New rule: `no-contains` (Christophe Coevoet)
211
- * New rule: `no-error` (Ed Sanders)
212
- * New rule: `no-is-empty-object` (Ed Sanders)
213
- * New rule: `no-is-plain-object` (Ed Sanders)
214
- * New rule: `no-node-name` (Ed Sanders)
215
-
216
-
217
- * Rule fix: Add `removeAttr` to `no-attr` rule (Ed Sanders)
218
- * Rule fix: Add `removeProp` to `no-remove-prop` rule (Ed Sanders)
219
- * Rule fix: Add ajax method shorthands to `no-ajax-events` and `no-event-shorthand` (Ed Sanders)
220
- * Rule fix: Detect concatenated selectors in `no-sizzle` (Ed Sanders)
221
- * Rule fix: Handle concatenated strings and other methods in `no-parse-html-literal` (Ed Sanders)
222
- * Rule fix: Include the `$.clone` utility in the `no-clone` rule (Ed Sanders)
223
- * Rule fix: Include the `$.css` utility in the `no-css` rule (Ed Sanders)
224
- * Rule fix: Make error message in `no-parse-html-literal` less specific (Ed Sanders)
225
- * Rule fix: Separate out positional sizzle selectors and add to `deprecated-3.4` (Ed Sanders)
226
-
227
-
228
- * New fixer: Add fixer for `no-and-self` (Ed Sanders)
229
- * New fixer: Add fixer for `no-is-array` (Ed Sanders)
230
- * New fixer: Add fixer for `no-parse-json` (Ed Sanders)
231
- * New fixer: Add fixer for `no-unique` (Ed Sanders)
232
-
233
-
234
- * Docs: Build documentation from tests (Ed Sanders)
235
- * Docs: Comment in documentation when rules are fixable (Ed Sanders)
236
- * Docs: Document `npm run doc` (Ed Sanders)
237
- * Docs: Document when rules are included in a deprecation set (Ed Sanders)
238
-
239
-
240
- * Bug: Fix the detection of jQuery collection calls for non-fluent APIs (e.g. `.toArray()`) (Christophe Coevoet)
241
- * Bug: Support arrow functions (Ed Sanders)
242
-
243
-
244
- * Code: Add an EditorConfig config file (Christophe Coevoet)
245
- * Code: Introduce and use createCollectionOrUtilMethodRule (Ed Sanders)
246
- * Code: Update development dependencies (Ed Sanders)
247
-
248
-
249
- * Release: Add `files` list to package.json (Ed Sanders)
250
- * Release: Add global settings for configuring jQuery constructor/variable names (Ed Sanders)
251
- * Release: Update deprecation rulesets (Ed Sanders)
252
-
253
-
254
- * Improve messages' references to methods vs. static methods (Christophe Coevoet)
255
-
256
-
257
- ## v2.1.0
258
- * New rule: `no-class-state` (Ed Sanders)
259
-
260
-
261
- * Docs: Fix plugin name (Maurício Meneghini Fauth)
262
-
263
-
264
- * Code: Upgrade eslint-config-wikimedia to 0.12.0 (James D. Forrester)
265
-
266
-
267
- ## v2.0.0
268
- * New rule options: `[{allowScroll:true}]` in `no-animate` (Ed Sanders)
269
-
270
-
271
- * Renamed repository, rules and documentation to eslint-plugin-no-jquery (Ed Sanders)
272
- * Update eslint dev dependency to 5.14.0 (Ed Sanders)
273
-
274
- # Release history as wikimedia/eslint-plugin-jquery
275
-
276
-
277
- ## v1.3.2-wmf.6
278
- * New rule: `no-box-model` (Ed Sanders)
279
- * New rule: `no-browser` (Ed Sanders)
280
- * New rule: `no-context-prop` (Ed Sanders)
281
- * New rule: `no-error-shorthand` (Ed Sanders)
282
- * New rule: `no-fx-interval` (Ed Sanders)
283
- * New rule: `no-hold-ready` (Ed Sanders)
284
- * New rule: `no-is-numeric` (Ed Sanders)
285
- * New rule: `no-load-shorthand` (Ed Sanders)
286
- * New rule: `no-now` (Ed Sanders)
287
- * New rule: `no-on-ready` (Ed Sanders)
288
- * New rule: `no-ready-shorthand` (Ed Sanders)
289
- * New rule: `no-selector-prop` (Ed Sanders)
290
- * New rule: `no-sub` (Ed Sanders)
291
- * New rule: `no-support` (Ed Sanders)
292
- * New rule: `no-unload-shorthand` (Ed Sanders)
293
-
294
-
295
- * Bug: Fix `isjQuery` util to match `$`-prefixed properties (Ed Sanders)
296
- * Bug: Fix `isjQuery` to not match methods of jQuery properties (Ed Sanders)
297
- * Bug: Only catch `toggle(arg)` if `arg` is definitely not a boolean (Ed Sanders)
298
-
299
-
300
- * Code: De-deduplicate rule generation (Ed Sanders)
301
- * Code: Remove useless export of traverse method (Ed Sanders)
302
-
303
-
304
- ## v1.3.2-wmf.5
305
- * New rule: `no-animate-toggle` (Ed Sanders)
306
- * Add "Prefer CSS transitions" to animation rule messages (Ed Sanders)
307
- * Add " or $.trigger" to `no-event-shorthand` warning (Ed Sanders)
308
-
309
-
310
- ## v1.3.2-wmf.4
311
- * Fix typo in config listing (Ed Sanders)
312
-
313
-
314
- ## v1.3.2-wmf.3
315
- * Revert package name, breaking npm package references to instead fix git references (Ed Sanders)
316
-
317
-
318
- ## v1.3.2-wmf.2
319
- * Provide version-specific deprecation configs (James D. Forrester)
320
- * Move 'deprecated' config as a pointer to latest, remove old 'slim' config (Ed Sanders)
321
-
322
-
323
- * New rule: `no-and-self` (Ed Sanders)
324
- * New rule: `no-die` and `no-live` (Ed Sanders)
325
- * New rule: `no-event-shorthand` (Ed Sanders)
326
- * New rule: `no-global-selector` (Ed Sanders)
327
- * New rule: `no-is-window` (Ed Sanders)
328
- * New rule: `no-noop` (Ed Sanders)
329
- * New rule: `no-parse-html-literal` (Ed Sanders)
330
- * New rule: `no-parse-json` (Ed Sanders)
331
- * New rule: `no-type` (Ed Sanders)
332
- * New rule: `no-unbind` (Ed Sanders)
333
- * New rule: `no-undelegate` (Ed Sanders)
334
- * New rule: `no-unique` (Ed Sanders)
335
-
336
-
337
- * Miscellaneous release-related clean-up (James D. Forrester)
338
-
339
-
340
- ## v1.3.2-wmf.1
341
- * New rule: `no-is-array` (Mackie Underdown)
342
- * New rule: `no-is-function` (Brendan Abbott; renamed by Ed Sanders pre-release)
343
- * New rule: `no-extend` (Brendan Abbott)
344
- * New rule: `no-grep` (Ed Sanders)
345
- * New rule: `no-each-collection` (Ed Sanders)
346
- * New rule: `no-each-util` (Ed Sanders)
347
- * New rule: `no-map-collection` (Ed Sanders)
348
- * New rule: `no-map-util` (Ed Sanders)
349
-
350
-
351
- * Deprecated rule: `no-each` (Ed Sanders)
352
- * Deprecated rule: `no-map` (Ed Sanders)
353
-
354
-
355
- * Code: Update development dependencies (David Graham)
356
- * Code: Refactor to use new rule format (Ed Sanders)
357
-
358
-
359
- * README: Note that this is a fork (James D. Forrester)