Skip to content

Formats

The formats option enables linting for non-code or mixed-content file formats.

Install @santi020k/eslint-config-formats alongside the lean basic package before enabling entries on this page. The full package already includes it.

FormatEnumUse It When
MarkdownFormat.MarkdownThe project contains Markdown content that should be linted.
MDXFormat.MdxThe project contains MDX files.
JSONCFormat.JsoncThe project uses JSON with comments.
YAMLFormat.YamlThe project contains YAML configuration files.
TOMLFormat.TomlThe project contains TOML configuration files.
Package.jsonFormat.PackageJsonThe project’s package.json should be semantically validated for npm standards.
GraphQLFormat.GraphqlThe project contains GraphQL documents.
CSSFormat.CssThe project contains plain CSS files (uses the official @eslint/css plugin).
HTMLFormat.HtmlThe project contains plain HTML files (uses @html-eslint).
import { defineConfig, Format } from '@santi020k/eslint-config-basic'
export default await defineConfig({
formats: [Format.Markdown, Format.Mdx, Format.Yaml]
})
  • Format integrations are always explicit.
  • Markdown and MDX are especially useful when the repository includes docs, content, or developer guides that should follow the same standards as source code.
  • GitHub Actions workflows may use null event mappings such as workflow_dispatch:, pull_request:, and push:. These known event keys are accepted inside .github/workflows; unrelated empty mapping values still report a warning and should use {} or provide a mapping.

Did this page help?

Your answer stays in this browser. Share details on GitHub to help improve the docs.