How to create a custom lint rule for Markdown and MDX using remark and ESLint

This page summarizes the projects mentioned and recommended in the original post on dev.to

SurveyJS - JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor
Keep full control over the data you collect and tailor the form builder’s entire look and feel to your users’ needs. SurveyJS works with React, Angular, Vue 3, and is compatible with any backend or auth system. Learn more.
surveyjs.io
featured
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
  1. Gatsby

    The best React-based framework with performance, scalability and security built in.

    In the last years, modern web development architectures based on client-side JavaScript, reusable APIs and prebuilt Markup (JAMstack), and new web frameworks (Gatsby, Gridsome or Next.js), have gained increased popularity amongst developers, and even allowed us to start using JSX within our Markdown (MDX).

  2. SurveyJS

    JavaScript Form Builder with No-Code UI & Built-In JSON Schema Editor. Keep full control over the data you collect and tailor the form builder’s entire look and feel to your users’ needs. SurveyJS works with React, Angular, Vue 3, and is compatible with any backend or auth system. Learn more.

    SurveyJS logo
  3. mdx

    Markdown for the component era

    In the last years, modern web development architectures based on client-side JavaScript, reusable APIs and prebuilt Markup (JAMstack), and new web frameworks (Gatsby, Gridsome or Next.js), have gained increased popularity amongst developers, and even allowed us to start using JSX within our Markdown (MDX).

  4. Gridsome

    ⚡️ The Jamstack framework for Vue.js

    In the last years, modern web development architectures based on client-side JavaScript, reusable APIs and prebuilt Markup (JAMstack), and new web frameworks (Gatsby, Gridsome or Next.js), have gained increased popularity amongst developers, and even allowed us to start using JSX within our Markdown (MDX).

  5. Next.js

    The React Framework

    In the last years, modern web development architectures based on client-side JavaScript, reusable APIs and prebuilt Markup (JAMstack), and new web frameworks (Gatsby, Gridsome or Next.js), have gained increased popularity amongst developers, and even allowed us to start using JSX within our Markdown (MDX).

  6. blog-posts

    Fork this repository with the complete tutorial, if you don't want to start from scratch.

  7. remark-lint

    plugins to check (lint) markdown code style

    With our dependencies all installed, we can start creating a .remarkrc.js, which will contain all the plugins that will be consumed by the remark processor. For details about alternative or advanced configurations, please refer to Configuring remark-lint.

  8. remark

    markdown processor powered by plugins part of the @unifiedjs collective (by remarkjs)

    remark-lint: a plugin to lint markdown built on remark: (a markdown processor).

  9. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  10. mdast

    Markdown Abstract Syntax Tree format

    Because we will be inspecting a mdast, which is a markdown abstract syntax tree built upon unist, we can take advantage of the many existing unist utilities to inspect our tree's nodes.

  11. vfile

    Virtual file format for text processing used in @unifiedjs

    file (required): a virtual file format.

  12. unist

    Universal Syntax Tree used by @unifiedjs

    Because we will be inspecting a mdast, which is a markdown abstract syntax tree built upon unist, we can take advantage of the many existing unist utilities to inspect our tree's nodes.

  13. unist-util-visit

    utility to visit nodes

    For this example, we will use unist-util-visit to recursively inspect all the image nodes, and unist-util-generated to ensure we are not inspecting nodes that we have generated ourselves and do not belong to the doc.md.

  14. unist-util-generated

    utility to check if a node is generated

    For this example, we will use unist-util-visit to recursively inspect all the image nodes, and unist-util-generated to ensure we are not inspecting nodes that we have generated ourselves and do not belong to the doc.md.

  15. ESLint

    Find and fix problems in your JavaScript code.

    ESLint: the most popular tool for linting JavaScript code.

  16. eslint-mdx

    ESLint Parser/Plugin for MDX

    ESLint MDX: an ESLint plugin/parser for MDX files.

  17. InfluxDB

    InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Building ask-PDF service using LLMs

    1 project | dev.to | 17 Nov 2024
  • Introducing Content Collections

    4 projects | dev.to | 18 Jan 2024
  • Construindo um Painel de Blog Dinâmico com Next.js

    6 projects | dev.to | 1 Dec 2023
  • Remark plug-in, wrapping a span around a string

    1 project | /r/nextjs | 15 Jun 2023
  • Converting and customizing Markdown files to HTML with Unified, remark & rehype

    12 projects | dev.to | 11 Sep 2022

Did you know that JavaScript is
the 3rd most popular programming language
based on number of references?