Registry / devops / eslint-config-hexo

eslint-config-hexo

JSON →
library6.0.0jsnpmunverified

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-hexo
INSTALL
IMPORT
SIG · ESLINT-CONFIG-HEXO
E
eslint-config-hexo
devopsjavascriptv6.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

hexoConfig (default)
import hexoConfig from 'eslint-config-hexo'
const hexoConfig = require('eslint-config-hexo')
ESLint flat config expects an array of config objects. From v6 onwards, the default export is an array. In CommonJS, use require, but ensure ESLint is configured for flat config.
hexoTsLintConfig (TypeScript)
import hexoTsLintConfig from 'eslint-config-hexo/ts'
const hexoTsLintConfig = require('eslint-config-hexo/ts')
TypeScript config is provided at the subpath 'eslint-config-hexo/ts'. It is an array of flat configs for TypeScript support.
FlatConfig export
const hexoConfig = require('eslint-config-hexo')
For CommonJS projects using eslint.config.js, use require to import the flat config array. Works with ESLint >=9.

Shows how to extend both the base and TypeScript ESLint flat configs with custom rules.

// eslint.config.js import hexoConfig from 'eslint-config-hexo'; import hexoTsLintConfig from 'eslint-config-hexo/ts'; export default [ ...hexoConfig, ...hexoTsLintConfig, { rules: { 'no-console': 'warn', '@typescript-eslint/no-explicit-any': 'off' } } ];
Debug
Known issues
breakingv6.0.0 migrated to ESLint flat config (eslint.config.js). Legacy .eslintrc files are no longer supported.
fix
Replace .eslintrc.* with eslint.config.js. Import config as an array and spread it.
affects: >=6.0.0
breakingv6.0.0 requires Node.js >=18 and ESLint >=9.17.0. Older Node or ESLint versions will fail.
fix
Update Node.js to >=18 and ESLint to >=9.17.0.
affects: >=6.0.0
deprecatedv5.0.0 enabled no-console rule, which was not enabled before. Existing code with console.log may now fail linting.
fix
Disable 'no-console' rule in your config if console is allowed.
affects: >=5.0.0 <6.0.0
gotchaThe TypeScript config (eslint-config-hexo/ts) is only available from an undocumented subpath. Not all users may know to import from '/ts'.
fix
Import TypeScript rules from 'eslint-config-hexo/ts' as a separate array.
affects: >=4.2.0
Errors
Common errors & fixes
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'eslint-config-hexo'
Attempting to import an ESM-only package from a CommonJS context without proper handling, or package not installed.
fix
Ensure eslint-config-hexo is installed: npm install eslint-config-hexo --save-dev. If using require, use require('eslint-config-hexo').
Configuration for rule "no-console" is invalid
The 'no-console' rule was enabled in v5 but user may have misconfigured it.
fix
Set 'no-console' to 'off' or 'warn' in your config: rules: { 'no-console': 'off' }
ESLint couldn't find the config 'eslint-config-hexo'
Package not installed or not in node_modules.
fix
Run npm install eslint-config-hexo --save-dev
Upgrade
Version history
6.0.0latest on npm
Audit
Dependencies
eslintrequiredpeer dependency; required to run ESLint with this config. Must be ESLint >= 9.17.0 starting from v6.
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-config-hexo — npm install eslint-config-hexo · libregistry