Hi Dieter, ESLint is designed to work specifically with JavaScript, so unless a language is JS-based or otherwise embeds JS (like HTML or Markdown), ESLint won’t work for it.
There are some generic concepts that could be applied to other linters, but right now the ESLint code is pretty tightly coupled to JS concepts, so extracting the generic pieces would be a massive amount of work. I did actually look at extracting the generic pieces previously and concluded that it would be easier to write a new generic linter from scratch than try to extract generic pieces from ESLint (I think I have the beginnings of that on my hard drive somewhere, but not in any shape to share). Regards. On Wed, Jul 10, 2019 at 12:24 AM Dieter Geerts <[email protected]> wrote: > I'm in search for some yaml linter, so I can lint yaml docs used to > generate swagger ui (https://www.npmjs.com/package/swagger-jsdoc). But > the only one I can find is one that is very specifically tailored ( > https://github.com/replicatedhq/replicated-lint). Now what I see is that > the general principles/concepts ESLint has are the things needed, like the > ability to extract the yaml pieces to lint (like the markdown plugin does > to extract the JS code blocks). And in essence, it's just checking rules > based on a AST, which can be created from yaml code ( > https://www.npmjs.com/package/yaml-ast-parser). So I was wondering if it > would be possible to use ESLint with other AST's to be able to lint other > 'languages'? If this would not be possible, would it be logical to extract > the generic concepts to a base linter for several linters? > > -- > You received this message because you are subscribed to the Google Groups > "ESLint" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/eslint/ce5928de-1a1a-44ab-aca4-4dccee74e3d5%40googlegroups.com > <https://groups.google.com/d/msgid/eslint/ce5928de-1a1a-44ab-aca4-4dccee74e3d5%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- ______________________________ Nicholas C. Zakas @slicknet Author, Principles of Object-Oriented JavaScript <http://amzn.to/29Pmfrm> Author, Understanding ECMAScript 6 <http://amzn.to/29K1mIy> -- You received this message because you are subscribed to the Google Groups "ESLint" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/eslint/CAOkd9hmBp_Tc_1dN%3DDXphL1KE2ud4v3g9uDX5C8wk%3DN18cQ%3DtA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
