Closed bbgvalayev closed 3 years ago
Welcome! 👋
Thanks you for creating the issue. 🙌 I will come back to this as soon as possible.
@bbgvalayev Thanks for reporting. That was solved actually today. I just published 2.1.1
, which should improve it a lot. Would love to see the stat changes here with the new version.
Oh nice, I will give it a try, one thing I realized is that performance was affected when I added additional words like:
"inclusive-language/use-inclusive-words": [
"error",
{
"words": [
{
"word": "dummy",
"suggestions": ["mock", "placeholder", "sample value"],
"explanation": "The usage of the non-inclusive word '{{word}}' is discouraged, use '{{suggestion}}' instead."
},
{
"word": "handicap",
"suggestions": ["disable", "disability"],
"explanation": "The usage of the non-inclusive word '{{word}}' is discouraged, use '{{suggestion}}' instead."
}
],
"autofix": false,
"lintStrings": true
}
]
Yup. That was one of the identified bottlenecks. And regex.
See the thread here how things evolved.
https://github.com/muenzpraeger/eslint-plugin-inclusive-language/pull/31
Closing this.
Ok, does much better, updated results:
Rule | Time (ms) | Relative
:--------------------------------------|----------:|--------:
indent | 3277.074 | 14.2%
import/no-extraneous-dependencies | 2037.235 | 8.8%
react/void-dom-elements-no-children | 1432.298 | 6.2%
react/no-direct-mutation-state | 1047.166 | 4.5%
react/no-deprecated | 966.963 | 4.2%
react/default-props-match-prop-types | 942.847 | 4.1%
react/display-name | 610.532 | 2.7%
react/prefer-stateless-function | 594.925 | 2.6%
inclusive-language/use-inclusive-words | 592.754 | 2.6%
react/no-string-refs | 567.729 | 2.5%
The plugin was very easy to integrate and configuration is extremely flexible however linting time increases by a lot, can this be improved?