{"id":26207,"library":"remark-lint-emphasis-marker","title":"remark-lint-emphasis-marker","description":"remark-lint rule to warn when emphasis markers (asterisks vs underscores) violate a given or consistent style. Current stable version is 4.0.1, ESM-only, requires Node.js 16+. Part of the unified/remark ecosystem, ships TypeScript types. Integrates with remark-lint presets like `remark-preset-lint-consistent` and `remark-preset-lint-markdown-style-guide`. Distributed as a scoped package on npm. Includes CLI support via remark CLI.","status":"active","version":"4.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","emphasis","lint","marker","remark","remark-lint","remark-lint-rule","rule","typescript"],"install":[{"cmd":"npm install remark-lint-emphasis-marker","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-emphasis-marker","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-emphasis-marker","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core unified processor required for remark plugins","package":"unified","optional":false},{"reason":"Required to provide lint infrastructure and report warnings","package":"remark-lint","optional":false},{"reason":"Needed to parse Markdown input in API usage examples","package":"remark-parse","optional":true},{"reason":"Needed to stringify output in API usage examples","package":"remark-stringify","optional":true}],"imports":[{"note":"Package is ESM-only since v4. CommonJS require will throw an error.","wrong":"const remarkLintEmphasisMarker = require('remark-lint-emphasis-marker')","symbol":"default","correct":"import remarkLintEmphasisMarker from 'remark-lint-emphasis-marker'"},{"note":"Marker is a TypeScript type export, not a runtime value. Use 'import type' or 'import { type Marker }'","wrong":"import { Marker } from 'remark-lint-emphasis-marker'","symbol":"type Marker","correct":"import type { Marker } from 'remark-lint-emphasis-marker'"},{"note":"Options is a TypeScript type export, not a runtime value. Use 'import type' or 'import { type Options }'","wrong":"import { Options } from 'remark-lint-emphasis-marker'","symbol":"type Options","correct":"import type { Options } from 'remark-lint-emphasis-marker'"}],"quickstart":{"code":"import { unified } from 'unified';\nimport remarkParse from 'remark-parse';\nimport remarkStringify from 'remark-stringify';\nimport remarkLint from 'remark-lint';\nimport remarkLintEmphasisMarker from 'remark-lint-emphasis-marker';\nimport { read } from 'to-vfile';\nimport { reporter } from 'vfile-reporter';\n\nconst file = await read('example.md');\n\nawait unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintEmphasisMarker, '*')\n  .use(remarkStringify)\n  .process(file);\n\nconsole.error(reporter(file));","lang":"typescript","description":"Lint emphasis markers in a Markdown file, enforcing asterisks as the preferred marker."},"warnings":[{"fix":"Use import syntax and ensure Node.js 16+. If you must use CommonJS, stick with v3.x.","message":"Package is ESM-only starting from v4.0.0. Requires Node.js 16+ and cannot be required with CommonJS.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Specify the desired marker explicitly to avoid unexpected behavior: .use(remarkLintEmphasisMarker, '*')","message":"The default option is 'consistent', which auto-detects the first emphasis marker and warns on mismatches. Explicitly setting to '*' or '_' enforces that specific marker.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Update TypeScript usage to only use '*' | '_' | 'consistent'.","message":"TypeScript type Options previously accepted arbitrary strings; now tightly typed as Marker | 'consistent'.","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"Use only '*' or '_' for emphasis markers in Markdown content.","message":"Only supports '*' and '_' markers. Other characters (like '~') are not valid for emphasis in Markdown and are ignored by this rule.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Switch to import syntax: import remarkLintEmphasisMarker from 'remark-lint-emphasis-marker';","cause":"Using CommonJS require() on an ESM-only package.","error":"ERR_REQUIRE_ESM: require() of ES Module not supported"},{"fix":"Ensure correct usage: unified().use(remarkLintEmphasisMarker, '*'). The function is a plugin, not a standalone linter.","cause":"Missing or incorrect usage with unified: possibly forgot .use() or passed options incorrectly.","error":"TypeError: remarkLintEmphasisMarker is not a function"},{"fix":"Install remark-lint: npm install remark-lint","cause":"Missing required peer dependency 'remark-lint'.","error":"Cannot find module 'remark-lint'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}