dgraham / eslint-plugin-jquery

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

ESLint extension #34

Closed Berkmann18 closed 5 years ago

Berkmann18 commented 5 years ago

As of now, the README doesn't show what configurations this plugin has and how one would go about using either of the configurations (deprecated or slim) to enable the rules this plugin offers. It's good to show each rule in a way that one could tweak each individual ones but it's not obvious to see how a newcomer (or anyone who didn't dive through the code for that matter) could enable all (deprecated) or a subset (slim) of the rules without manually adding each rule.

In other words, it would be cool if the README showed something like this:

{
  "plugins": [
    "jquery"
  ],
  "extends": [
    "plugin:jquery/deprecated"
  ]
}
dgraham commented 5 years ago

I agree we should show the configuration names. Do you want to open a pull request showing the config examples?

We used the individual rules, rather than the entire deprecated config, during our migration off of jQuery. It was easier to enable a few rules at a time, fix those errors, and enable a few more rules. So the configs were just never documented here.

Berkmann18 commented 5 years ago

@dgraham Sure. I've submited the PR 😁.