eslint-plugin-hyoban
raw JSON → 0.14.1 verified Sat Apr 25 auth: no javascript
Hyoban extended ESLint rules is an ESLint plugin offering custom rules for enforcing formatting and code style conventions, currently at v0.14.1. It includes rules such as `md-one-sentence-per-line` to enforce one sentence per line in markdown paragraphs, as well as other rules for code quality. The plugin is distributed as an npm package, actively maintained with frequent releases, and it ships TypeScript type definitions. It differentiates itself by providing targeted rules for markdown layout and extending ESLint's capabilities beyond standard rule sets.
Common errors
error ESLint couldn't find the plugin "eslint-plugin-hyoban". ↓
cause Plugin not installed or not declared in package.json.
fix
Run:
npm install eslint-plugin-hyoban --save-dev error Configuration for rule "hyoban/md-one-sentence-per-line" is invalid: Unsupported option ignorePatterns. ↓
cause Using `ignorePatterns` option with plugin version <0.14.1.
fix
Upgrade to >=0.14.1:
npm install eslint-plugin-hyoban@latest --save-dev error Cannot find module 'eslint-plugin-hyoban' when using flat config. ↓
cause Incorrect import syntax for flat config.
fix
Use
import hyoban from 'eslint-plugin-hyoban'; Warnings
gotcha The `md-one-sentence-per-line` rule applies to all paragraphs in Markdown files, not just root-level ones (since v0.14.0). This may cause unintended formatting changes. ↓
fix Use the `ignorePatterns` option added in v0.14.1 to exclude specific paragraphs or elements.
deprecated Plugin does not explicitly deprecate rules but users should check for version updates as some rule names may change. ↓
fix Always reference the latest documentation for rule names and options.
gotcha To use with flat config (ESLint >=9.0.0), you must import the plugin as a default export and then destructure the plugins key. ↓
fix Use `import hyoban from 'eslint-plugin-hyoban';` then `plugins: { hyoban }` in flat config.
Install
npm install eslint-plugin-hyoban yarn add eslint-plugin-hyoban pnpm add eslint-plugin-hyoban Imports
- eslint-plugin-hyoban wrong
import hyoban from 'eslint-plugin-hyoban'correctmodule.exports.plugins = ['hyoban'] - rules
import plugin from 'eslint-plugin-hyoban' // then access plugin.rules - plugin wrong
const plugin = require('eslint-plugin-hyoban').defaultcorrectimport plugin from 'eslint-plugin-hyoban'
Quickstart
// .eslintrc.cjs
module.exports = {
plugins: ['hyoban'],
rules: {
'hyoban/md-one-sentence-per-line': 'error',
'hyoban/other-rule': 'warn'
}
};
// Or flat config (eslint.config.js)
import hyoban from 'eslint-plugin-hyoban';
export default [
{
plugins: { hyoban },
rules: {
'hyoban/md-one-sentence-per-line': 'error',
}
}
];