The official ESLint shareable config for Hexo projects. Current version 6.0.0 requires Node >=18 and ESLint >=9.17.0, and has migrated to ESLint's flat config system (eslint.config.js), breaking from the legacy .eslintrc format used in prior versions. It includes overrides for Hexo's code style and supports TypeScript via a separate import (eslint-config-hexo/ts). Use this to enforce consistent linting rules across Hexo plugins and themes. Differentiator: tailored specifically for Hexo, not a generic config.
npm install eslint-config-hexoVerified import paths — ran on the pinned version, not inferred.
Shows how to extend both the base and TypeScript ESLint flat configs with custom rules.
Replace .eslintrc.* with eslint.config.js. Import config as an array and spread it.
Update Node.js to >=18 and ESLint to >=9.17.0.
Disable 'no-console' rule in your config if console is allowed.
Import TypeScript rules from 'eslint-config-hexo/ts' as a separate array.
Ensure eslint-config-hexo is installed: npm install eslint-config-hexo --save-dev. If using require, use require('eslint-config-hexo').Set 'no-console' to 'off' or 'warn' in your config: rules: { 'no-console': 'off' }Run npm install eslint-config-hexo --save-dev