remark-lint rule to warn when a final newline character (\n) is missing at the end of a file. Part of the remark-lint ecosystem, this plugin enforces POSIX-style file endings. Current stable version is 3.0.1 (ESM-only, requires Node.js 16+). It is included in the `remark-preset-lint-recommended` preset. Unlike some linters that auto-fix, this rule only warns; auto-fixing can be done via `remark-stringify`. No configuration options.
npm install remark-lint-final-newlineNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Set up unified pipeline with remark-parse, remark-lint, the rule, and remark-stringify to lint and optionally fix missing final newline.
Switch to import syntax and ensure Node.js >=16.
Do not pass any arguments to .use(remarkLintFinalNewline).
Ensure remark-stringify is included in your unified pipeline.
The rule expects exactly one \n at EOF. Use remark-stringify to normalize.
Change to import remarkLintFinalNewline from 'remark-lint-final-newline'
npm install remark-lint-final-newline
Use default import: import remarkLintFinalNewline from 'remark-lint-final-newline'