Registry / testing / eslint-plugin-ghost

eslint-plugin-ghost

JSON →
library3.5.0jsnpmunverified

eslint-plugin-ghost provides shared ESLint configurations and custom rules for Ghost projects. As of version 3.5.0, it offers presets for Node, browser, Ember, TypeScript, and test environments, with style-disabled variants. It is actively maintained by the Ghost Foundation and follows Ghost's code style documented in base.js. Unlike generic ESLint configs, it is tightly coupled to the Ghost ecosystem, ensuring consistency across official Ghost repos. Release cadence is irregular, driven by changes in Ghost's code style or ESLint updates.

npm install eslint-plugin-ghost
INSTALL
IMPORT
SIG · ESLINT-PLUGIN-GHOS
E
eslint-plugin-ghost
testingjavascriptv3.5.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.

plugin:ghost/[config]
extends: ['plugin:ghost/node']
extends: ['ghost/node']
Must include 'plugin:' prefix in extends array as per ESLint plugin config naming convention.
ghost (plugin)
plugins: ['ghost']
plugins: ['eslint-plugin-ghost']
ESLint automatically resolves 'ghost' to 'eslint-plugin-ghost' in plugins array; use short name.
require('eslint-plugin-ghost')
const plugin = require('eslint-plugin-ghost')
import plugin from 'eslint-plugin-ghost'
This package is CJS-only; ES module import is not supported. Use require() even in .eslintrc.cjs files.

Shows basic setup with 'ghost' plugin and 'plugin:ghost/node' config for a Node.js project.

// .eslintrc.js module.exports = { plugins: ['ghost'], extends: [ 'plugin:ghost/node', ], rules: { // override rules here } };
Debug
Known issues
breakingIn v2.x, config names changed from 'plugin:ghost/[type]' to include 'plugin:' prefix. Using old format 'ghost/node' will not work.
fix
Update extends to use 'plugin:ghost/[config]' format.
affects: >=2.0.0
deprecatedConfig 'plugin:ghost/ember' is deprecated and will be removed in v4; use 'plugin:ghost/ember-no-style' or migrate to ember-specific plugin.
fix
Switch to 'plugin:ghost/ember-no-style' or use @ember/eslint-plugin.
affects: >=3.0.0
gotchaStyle rules are included by default; use '-no-style' presets to disable them. If you don't, your code may fail style checks even if logic is correct.
fix
Use configs like 'plugin:ghost/node-no-style' instead of 'plugin:ghost/node'.
affects: >=1.0.0
gotchaThe plugin assumes you are using ESLint >=5.11.0. Older versions may not support important features like 'plugin:' prefix.
fix
Update ESLint to >=5.11.0.
affects: <5.11.0
Errors
Common errors & fixes
Error: Cannot find module 'eslint-plugin-ghost'
Missing npm install of eslint-plugin-ghost in the project.
fix
Run 'npm install eslint-plugin-ghost --save-dev' or 'yarn add eslint-plugin-ghost --dev'.
ESLint couldn't find the config "plugin:ghost/node". Error: Failed to load plugin 'ghost' from package 'eslint-plugin-ghost'
Typo in config name or missing 'plugin:' prefix.
fix
Ensure extends is 'plugin:ghost/node' not 'ghost/node' and that the plugin is installed.
Invalid 'extends' configuration: 'ghost/node'. 'extends' must be a string or array of strings.
Omitting 'plugin:' prefix leads to ESLint trying to resolve a non-existent config.
fix
Change extends to 'plugin:ghost/node'.
Upgrade
Version history
3.5.0latest on npm
Audit
Dependencies
eslintrequiredPeer dependency; required to run ESLint and load plugin configurations
Agent activity
2 hits · last 30 days
node
2
Resources
eslint-plugin-ghost — npm install eslint-plugin-ghost · libregistry