{"id":26253,"library":"remark-lint-no-file-name-articles","title":"remark-lint-no-file-name-articles","description":"A remark-lint rule that warns when Markdown file names start with articles such as \"a\", \"an\", or \"the\". Current stable version is 3.0.1, released as part of the remark-lint monorepo. It is ESM-only (Node.js 16+), ships TypeScript types, and has no configurable options. Unlike generic lint rules, this is specifically tailored for documentation sites and publishing workflows where article-prefixed filenames are considered poor practice.","status":"active","version":"3.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/remarkjs/remark-lint#main","tags":["javascript","article","basename","file","lint","name","remark","remark-lint","remark-lint-rule","typescript"],"install":[{"cmd":"npm install remark-lint-no-file-name-articles","lang":"bash","label":"npm"},{"cmd":"yarn add remark-lint-no-file-name-articles","lang":"bash","label":"yarn"},{"cmd":"pnpm add remark-lint-no-file-name-articles","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Plugin system that remark-lint is built on","package":"unified","optional":false},{"reason":"Parent linting framework that provides the rule context","package":"remark-lint","optional":false}],"imports":[{"note":"Default export only; named import does not exist. ESM-only since v3, no CommonJS support.","wrong":"import { remarkLintNoFileNameArticles } from 'remark-lint-no-file-name-articles'","symbol":"remarkLintNoFileNameArticles","correct":"import remarkLintNoFileNameArticles from 'remark-lint-no-file-name-articles'"},{"note":"Must also include --use remark-lint as the base plugin.","wrong":"remark --use remark-lint-no-file-name-articles .","symbol":"remarkLintNoFileNameArticles (CLI usage)","correct":"remark --use remark-lint --use remark-lint-no-file-name-articles ."},{"note":"No additional TypeScript types exported; use standard types from unified and remark-lint.","wrong":"Does not export custom types; rely on @types/unified and @types/remark-lint","symbol":"(TypeScript type usage)","correct":"import type * as unified from 'unified'; import type { Plugin } from 'remark-lint';"}],"quickstart":{"code":"import { unified } from 'unified'\nimport remarkParse from 'remark-parse'\nimport remarkStringify from 'remark-stringify'\nimport remarkLint from 'remark-lint'\nimport remarkLintNoFileNameArticles from 'remark-lint-no-file-name-articles'\nimport { read } from 'to-vfile'\nimport { reporter } from 'vfile-reporter'\n\nconst file = await read('the-title.md')\n\nawait unified()\n  .use(remarkParse)\n  .use(remarkLint)\n  .use(remarkLintNoFileNameArticles)\n  .use(remarkStringify)\n  .process(file)\n\nconsole.error(reporter(file))\n// => '1:1: Unexpected file name starting with `the`, remove it'","lang":"typescript","description":"Shows how to use the rule programmatically via unified pipeline, reading a file and reporting lint warnings."},"warnings":[{"fix":"Migrate to ESM or stay on v2 (if still available).","message":"v3 requires ESM and Node.js 16+. No CommonJS support.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Upgrade to v3 (requires ESM).","message":"v2 is deprecated and no longer maintained.","severity":"deprecated","affected_versions":"2.x"},{"fix":"Use another rule or custom plugin for directory name linting.","message":"This rule only checks the file basename, not the entire path. It does not inspect directories.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"If you need custom article lists, consider contributing or using a more flexible lint rule.","message":"The rule has no configurable options. It checks against a fixed set of English articles (a, an, the) and does not support other languages.","severity":"gotcha","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use import or switch to Node.js 16+ with type: \"module\" in package.json.","cause":"Trying to require() an ESM-only package in Node.js with CommonJS.","error":"ERR_REQUIRE_ESM"},{"fix":"Use `import remarkLintNoFileNameArticles from 'remark-lint-no-file-name-articles'` (no braces).","cause":"Named import used incorrectly; this package exports a default only.","error":"TypeError: (0 , remarkLintNoFileNameArticles) is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}