quick-lint / quick-lint-js

quick-lint-js finds bugs in JavaScript programs
https://quick-lint-js.com
GNU General Public License v3.0
1.52k stars 192 forks source link

Article: speed up ESLint #681

Open strager opened 2 years ago

strager commented 2 years ago

Some ideas:

strager commented 1 year ago

One technique is to use jest-runner-eslint to parallelize ESLint across files: https://github.com/eslint/eslint/issues/3565#issuecomment-1075309795

strager commented 1 year ago

Profiling ESLint on Prettier with Chrome's about://inspect:

$ time EFF_NO_LINK_RULES=true ~/tmp/Projects/nvm/versions/node/v18.6.0/bin/node --enable-source-maps --inspect-brk ./node_modules/.bin/eslint . --format friendly

It shows that NodeEventGenerator.applySelector is the hottest function (39% of wall time). parse (Espree) only took 8% of wall time.