eslint-plugin-sentences-per-line
v0.1.3
Published
ESLint plugin for limiting sentences per line in Markdown code. π
Readme
eslint-plugin-sentences-per-line allows you to enforce that no line in your Markdown files contains more than one sentence.
This is useful because:
- Shorter lines result in simpler, easier-to-understand Git diffs
- Longer lines are harder to read in source code
- First sentence. Second sentence.
+ First sentence.
+ Second sentence.Usage
π This ESLint plugin assumes you're using
@eslint/markdown.
First install this package as a devDependency:
npm i -D eslint-plugin-sentences-per-lineThen add the following options to your ESLint configuration file:
import markdown from "@eslint/markdown";
import sentencesPerLine from "eslint-plugin-sentences-per-line";
export default [
// your other ESLint configurations
{
extends: [
markdown.configs.recommended,
// π Apply this config to your *.md files
sentencesPerLine.configs.recommended,
],
files: ["**/*.md"],
},
];Rules
πΌ Configurations enabled in.
β
Set in the recommended configuration.
π§ Automatically fixable by the --fix CLI option.
| Name | Description | πΌ | π§ | | :----------------------- | :----------------------------------------- | :- | :- | | one | Limits Markdown sentences to one per line. | β | π§ |
Alternatives
This package is part of the sentences-per-line family of packages. You might also consider:
markdownlint-sentences-per-line: Markdownlint rule to enforce sentences per line in Markdown files.prettier-plugin-sentences-per-line: Prettier plugin to enforce sentences per line in Markdown files.
