Closed pubmikeb closed 2 years ago
We would gladly accept a pull request for these changes. :)
@nzakas , I've have a look on Configuration.jsx which is looks like to be responsible for Demo content:
<RulesConfig
config={this.props.options.rules}
ruleNames={this.props.ruleNames}
docs={this.props.docs}
onUpdate={this.handleRulesConfigUpdate}
/>
Unfortunately, I don't see where this.props.options.rules
is populated and if this list contains a rule state property (e.g. ative
/deprecated
).
It looks like it’s coming from here: https://github.com/eslint/website/blob/c7ee67d8deec5c0d347c0f62b94a4ed8f6da72af/src/js/demo/components/App.jsx#L225
Each rule has a meta property that should give you the data you need: https://github.com/eslint/eslint/blob/44f7de5ee4d934dee540d3d55305126c670f6bfc/lib/rules/no-process-exit.js#L14
I'll give a look on it on the coming weekend and will let you know, if I can arrange a PR.
Unfortunately, currently I can't allocate enough time to implement the issue in a reasonable time.
No worries. Unfortunately the demo is a pretty low priority for the team right now so it’s unlikely this will get addressed anytime soon. I’ll leave the issue open in case anyone else wants to take this.
I opened a PR that will differentiate the deprecated rules by adding (deprecated)
next to the rule.
The Demo section has very useful
.eslintrc.json
configurator, the only problem it contains deprecated, duplicated, and actual rules.It would be great:
id-blacklist
vs.id-denylist
.So we could in one click activate just actual rules, not caring about deprecated ones.