• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yannickcr / eslint-plugin-react / 4228 / 19
98%
master: 97%

Build:
Build:
LAST BUILD BRANCH: jsx-valid-rel
DEFAULT BRANCH: master
Ran 15 Jun 2020 10:07PM UTC
Files 106
Run time 11s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Jun 2020 09:59PM UTC coverage: 97.593%. First build
TEST=true PRETEST=true

push

travis-ci

lencioni
Cache detected React version

I've been timing and profiling ESLint runs at Airbnb and noticed that
react/no-unknown-property is particularly slow for us when using the
"detect" setting for React version.

When running ESLint using TIMING=1 on a directory that contains about
500 files to be linted in it, react/no-unknown-property shows up as
taking about 1700ms.

Looking at the callstacks in the profiler, it seems that when this rule
calls getStandardName for every JSXAttribute here, it will actually do
all of the work to detect the React version every time to determine the
correct set of DOM property names. Since there may be a lot of
JSXAttribute nodes in a codebase, this adds up to quite a bit of work.

By specifying the react version in our ESLint config, the
no-unkown-property rule drops out of the top 10 slowest rules entirely,
with the 10th slowest clocking in at 180ms.

I think it would be a good idea to cache the React version when using
detect instead of looking it up every time.

4434 of 4659 branches covered (95.17%)

5230 of 5359 relevant lines covered (97.59%)

515.52 hits per line

Source Files on job 4228.19 (TEST=true PRETEST=true)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 4008
  • Travis Job 4228.19
  • b8e91a57 on github
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc