ls-lint: Slow for my project (1.9.2)

First, let me start by saying that I love ls-lint. This is one of those things I didn’t know I needed until I had it.

However despite the advertised speed, ls-lint isn’t all that quick for me. I’m wondering if it has to do with my config, and whether you might have tips on what I could change to speed things up. I’m using version 1.9.2.

First, timing (macOS Big Sur on a 2019 16" with an Intel Core i7):

Screen Shot 2021-01-22 at 1 28 19 PM

Here’s my config:

ls:
  .github/workflows:
    .yml: kebab-case

  cypress:
    fixtures:
      .json: kebab-case
    integration:
      .test.ts: PascalCase

  src:
    .gql: kebab-case
    .svg: kebab-case
    .ts: kebab-case
    .d.ts: kebab-case
    .generated.ts: kebab-case
    .test.ts: kebab-case
    .tsx: PascalCase
    .stories.tsx: PascalCase
    .test.tsx: PascalCase
    hooks:
      .ts: camelCase
      .test.ts: camelCase

ignore:
  - .git/
  - .idea/
  - .nyc_output/
  - build/
  - cypress-coverage/
  - jest-coverage/
  - node_modules/
  - reports/
  - src/index.tsx
  - src/serviceWorker.ts

The project is a git repo of React with TypeScript, so there’s things like .git and node_modules to deal with.

Here are some file counts:

Screen Shot 2021-01-22 at 1 38 59 PM

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (10 by maintainers)

Most upvoted comments

Perfect haha I think i have to stop the walking through the ignored ones Will fix this in v2 👍

To speed up your CI builds you can just run ls-lint via npx before you even run npm install

fyi: ls-lint v1.11.0 will boost! around 1100% faster then v1.10.0 (tested with nuxt.js repo)

Benchmark 1: ./ls-lint-1-10
  Time (mean ± σ):     627.2 ms ±  19.0 ms    [User: 203.5 ms, System: 442.7 ms]
  Range (min … max):   599.5 ms … 666.1 ms    10 runs
➜  nuxt.js git:(dev) ✗ hyperfine --warmup 3 './ls-lint-1-11'
Benchmark 1: ./ls-lint-1-11
  Time (mean ± σ):      51.9 ms ±   3.2 ms    [User: 21.0 ms, System: 30.1 ms]
  Range (min … max):    46.1 ms …  60.7 ms    53 runs

Thank you so much for the sponsorship! ❤️

Will be part of v1.11.0 🎉

Alright, thank you for all of this informations - Will take a look when i build up the v2 - maybe there is an issue with the ignore index.

Thanks!

Your config looks beautiful btw 👍