Registry / testing / remark-lint-no-file-name-articles

remark-lint-no-file-name-articles

JSON →
library3.0.1jsnpmunverified

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.

npm install remark-lint-no-file-name-articles
INSTALL
IMPORT
SIG · REMARK-LINT-NO-FIL
R
remark-lint-no-file-name-articles
testingjavascriptv3.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

remarkLintNoFileNameArticles
import remarkLintNoFileNameArticles from 'remark-lint-no-file-name-articles'
import { remarkLintNoFileNameArticles } from 'remark-lint-no-file-name-articles'
Default export only; named import does not exist. ESM-only since v3, no CommonJS support.
remarkLintNoFileNameArticles (CLI usage)
remark --use remark-lint --use remark-lint-no-file-name-articles .
remark --use remark-lint-no-file-name-articles .
Must also include --use remark-lint as the base plugin.
(TypeScript type usage)
import type * as unified from 'unified'; import type { Plugin } from 'remark-lint';
Does not export custom types; rely on @types/unified and @types/remark-lint
No additional TypeScript types exported; use standard types from unified and remark-lint.

Shows how to use the rule programmatically via unified pipeline, reading a file and reporting lint warnings.

import { unified } from 'unified' import remarkParse from 'remark-parse' import remarkStringify from 'remark-stringify' import remarkLint from 'remark-lint' import remarkLintNoFileNameArticles from 'remark-lint-no-file-name-articles' import { read } from 'to-vfile' import { reporter } from 'vfile-reporter' const file = await read('the-title.md') await unified() .use(remarkParse) .use(remarkLint) .use(remarkLintNoFileNameArticles) .use(remarkStringify) .process(file) console.error(reporter(file)) // => '1:1: Unexpected file name starting with `the`, remove it'
Debug
Known issues
breakingv3 requires ESM and Node.js 16+. No CommonJS support.
fix
Migrate to ESM or stay on v2 (if still available).
affects: >=3.0.0
deprecatedv2 is deprecated and no longer maintained.
fix
Upgrade to v3 (requires ESM).
affects: 2.x
gotchaThis rule only checks the file basename, not the entire path. It does not inspect directories.
fix
Use another rule or custom plugin for directory name linting.
affects: >=1.0.0
gotchaThe rule has no configurable options. It checks against a fixed set of English articles (a, an, the) and does not support other languages.
fix
If you need custom article lists, consider contributing or using a more flexible lint rule.
affects: >=3.0.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM
Trying to require() an ESM-only package in Node.js with CommonJS.
fix
Use import or switch to Node.js 16+ with type: "module" in package.json.
TypeError: (0 , remarkLintNoFileNameArticles) is not a function
Named import used incorrectly; this package exports a default only.
fix
Use `import remarkLintNoFileNameArticles from 'remark-lint-no-file-name-articles'` (no braces).
Upgrade
Version history
3.0.1latest on npm
Audit
Dependencies
unifiedrequiredPlugin system that remark-lint is built on
remark-lintrequiredParent linting framework that provides the rule context
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-no-file-name-articles — npm install remark-lint-no-file-name-articles · libregistry