Registry / testing / remark-lint-no-file-name-mixed-case

remark-lint-no-file-name-mixed-case

JSON →
library3.0.1jsnpmunverified

remark-lint rule to warn when file names use mixed case (e.g., 'MyFile.md' instead of 'myfile.md' or 'MYFILE.md'). Version 3.0.1 is the current stable release, published as part of the remark-lint monorepo. This package helps enforce consistent casing for Markdown file names in projects. It is ESM-only, requires Node.js 16+, and integrates with unified/remark. No configuration options.

npm install remark-lint-no-file-name-mixed-case
INSTALL
IMPORT
SIG · REMARK-LINT-NO-FIL
R
remark-lint-no-file-name-mixed-case
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.

default
import remarkLintNoFileNameMixedCase from 'remark-lint-no-file-name-mixed-case'
const remarkLintNoFileNameMixedCase = require('remark-lint-no-file-name-mixed-case')
This package is ESM-only. CommonJS require() will fail. Use dynamic import() if needed.
remarkLintNoFileNameMixedCase
import remarkLintNoFileNameMixedCase from 'remark-lint-no-file-name-mixed-case'
import { remarkLintNoFileNameMixedCase } from 'remark-lint-no-file-name-mixed-case'
This package has a default export only. Named import will not work.
type (TypeScript)
import type { Plugin } from 'unified'
No types are exported from this package beyond the default export. Use the default import with unified's Plugin type.

Shows how to use the plugin with unified API to lint file names for mixed case.

import { unified } from 'unified'; import remarkParse from 'remark-parse'; import remarkStringify from 'remark-stringify'; import remarkLint from 'remark-lint'; import remarkLintNoFileNameMixedCase from 'remark-lint-no-file-name-mixed-case'; import { read } from 'to-vfile'; import { reporter } from 'vfile-reporter'; const file = await read('example.md'); await unified() .use(remarkParse) .use(remarkLint) .use(remarkLintNoFileNameMixedCase) .use(remarkStringify) .process(file); console.error(reporter(file));
Debug
Known issues
breakingPackage is ESM-only; CommonJS require() will throw ERR_REQUIRE_ESM.
fix
Use import or dynamic import().
affects: >=2.0.0
deprecatedOptions parameter is not supported; the plugin takes no options.
fix
Do not pass any options when using the plugin.
affects: >=1.0.0
gotchaThe plugin checks the file name, not the content. It will warn for files like 'Mercury.md' (mixed case).
fix
Use lowercase or uppercase file names consistently.
affects: >=1.0.0
gotchaThe plugin requires remark-lint to be used as a separate plugin. Omitting remark-lint will result in no linting.
fix
Ensure remark-lint is added to the unified pipeline.
affects: >=1.0.0
gotchaNode.js version must be >=16. Using older versions will cause failures.
fix
Upgrade Node.js to version 16 or later.
affects: >=3.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/remark-lint-no-file-name-mixed-case/index.js from /path/to/file.js not supported.
Using CommonJS require() to import an ESM-only package.
fix
Change to import statement or use dynamic import().
SyntaxError: The requested module 'remark-lint-no-file-name-mixed-case' does not provide an export named 'remarkLintNoFileNameMixedCase'
Trying to import a named export when the package only has a default export.
fix
Use default import: import remarkLintNoFileNameMixedCase from 'remark-lint-no-file-name-mixed-case'
Error: Cannot find package 'remark-lint' from '...'
remark-lint is not installed. The plugin depends on remark-lint to function.
fix
Install remark-lint: npm install remark-lint
Upgrade
Version history
3.0.1latest on npm
Audit
Dependencies
unifiedoptionalPeer dependency for remark-lint integration
remark-lintoptionalWhen using the CLI or API, remark-lint must be included as a separate plugin
Agent activity
4 hits · last 30 days
node
4
Resources
remark-lint-no-file-name-mixed-case — npm install remark-lint-no-file-name-mixed-case · libregistry