dgraham / eslint-plugin-jquery

Disallow jQuery functions with native equivalents.
MIT License
209 stars 22 forks source link

Rule documentation #10

Closed RinkAttendant6 closed 7 years ago

RinkAttendant6 commented 7 years ago

It would be nice to have some documentation on what each rule enforces, instead of checking all the files inside the tests/ directory.

A one-line description would suffice, for example, "Disallow use of $.trim". Even better would be examples of incorrect and correct code (ideally showing equivalent versions on how to correct the error).

dgraham commented 7 years ago

I prefer to rely on the thorough documentation at Mozilla Developer Network, for the native web platform API, and jQuery API so we don't need to duplicate it here.

When a lint rule is violated, it prints a message like Prefer addEventListener to $.bind. Searching for mdn addEventListener and jquery bind finds great documentation.