streetsidesoftware / cspell

A Spell Checker for Code!
https://cspell.org
MIT License
1.27k stars 104 forks source link

Integration with Gulp #3235

Open movahhedi opened 2 years ago

movahhedi commented 2 years ago

Hi Is there a proper, official way to integrate cspell with Gulp? A package like gulp-cspell or something to run on the pipelines. If not, what method do you recommend?

Jason3S commented 2 years ago

@movahhedi,

As far as I know, there isn't one, but it wouldn't be too hard to make.

There are two approaches:

  1. Execute a shell command:
    const fileGlobs = "**/*.md";
    exec(`cspell ${fileGlobs}`, cb);
  2. Import it and call lint.

    const cspell = require("cspell");
    // ...
    await cspell.lint(["**/*.md"], {});
Jason3S commented 2 years ago

If anyone would like to help document or provide a good way support Gulp, it would be much appreciated.

movahhedi commented 2 years ago

I am, i was busy these days, but i've started it. I'll try to finish it soon.