jsx-eslint/eslint-plugin-react

perf improvements

Open

#3009 opened on Jun 21, 2021

View on GitHub
 (1 comment) (0 reactions) (0 assignees)JavaScript (8,630 stars) (2,797 forks)batch import
help wanted

Description

just had a test on a private repo:

Rule                              | Time (ms) | Relative
:---------------------------------|----------:|--------:
react/sort-comp                   |  1601.844 |    10.8%
react/no-deprecated               |  1513.337 |    10.2%
react/no-string-refs              |  1435.205 |     9.6%
import/default                    |  1394.642 |     9.4%
react/require-render-return       |  1388.927 |     9.3%
react/react-in-jsx-scope          |   748.025 |     5.0%
react/no-direct-mutation-state    |   695.972 |     4.7%
indent                            |   675.523 |     4.5%
import/named                      |   652.043 |     4.4%
react/display-name                |   641.281 |     4.3%
react/prop-types                  |   637.177 |     4.3%
import/no-duplicates              |   563.206 |     3.8%
react/jsx-fragments               |   558.779 |     3.8%
import/no-unresolved              |   250.786 |     1.7%
import/no-named-as-default        |   133.208 |     0.9%
import/no-named-as-default-member |   133.192 |     0.9%
react/jsx-no-undef                |   111.882 |     0.8%
react/jsx-indent                  |    84.047 |     0.6%
import/export                     |    72.087 |     0.5%
@typescript-eslint/no-unused-vars |    71.559 |     0.5%

seems some of the rules in the plugin cost too much time, any ideas to improve it? just bring it up as I didn't find any discussion about it. :)

Contributor guide