Using to besides HTML
You can also apply it to syntaxes besides HTML such as template engines or frameworks if using plugins together.
Installing plugins
Install the parser plugin through npm or Yarn:
- npm
- Yarn
- pnpm
npm install -D @markuplint/pug-parser
yarn add --dev @markuplint/pug-parser
pnpm add -D @markuplint/pug-parser
If a syntax has its own specification you should install the spec plugin with the parser plugin:
- npm
- Yarn
- pnpm
npm install -D @markuplint/jsx-parser @markuplint/react-spec
yarn add --dev @markuplint/jsx-parser @markuplint/react-spec
pnpm add -D @markuplint/jsx-parser @markuplint/react-spec
- npm
- Yarn
- pnpm
npm install -D @markuplint/vue-parser @markuplint/vue-spec
yarn add --dev @markuplint/vue-parser @markuplint/vue-spec
pnpm add -D @markuplint/vue-parser @markuplint/vue-spec
Supported syntaxes
Template or syntax | Parser | Spec |
---|---|---|
JSX | @markuplint/jsx-parser | @markuplint/react-spec |
Vue | @markuplint/vue-parser | @markuplint/vue-spec |
Svelte | @markuplint/svelte-parser | @markuplint/svelte-spec |
SvelteKit | @markuplint/svelte-parser/kit | - |
Astro | @markuplint/astro-parser | - |
Alpine.js | @markuplint/alpine-parser | @markuplint/alpine-parser/spec |
HTMX | @markuplint/htmx-parser | @markuplint/htmx-parser/spec |
Pug | @markuplint/pug-parser | - |
PHP | @markuplint/php-parser | - |
Smarty | @markuplint/smarty-parser | - |
eRuby | @markuplint/erb-parser | - |
EJS | @markuplint/ejs-parser | - |
Mustache or Handlebars | @markuplint/mustache-parser | - |
Nunjucks | @markuplint/nunjucks-parser | - |
Liquid | @markuplint/liquid-parser | - |
note
There is @markuplint/html-parser
package but the core package includes it.
You don't need to install and to specify it to the configuration.