{"id":19774,"library":"eslint-plugin-ghost","title":"ESLint Plugin Ghost","description":"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.","status":"active","version":"3.5.0","language":"javascript","source_language":"en","source_url":"git://github.com/TryGhost/eslint-plugin-ghost","tags":["javascript","eslint","eslintplugin","eslint-plugin"],"install":[{"cmd":"npm install eslint-plugin-ghost","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-plugin-ghost","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-plugin-ghost","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; required to run ESLint and load plugin configurations","package":"eslint","optional":false}],"imports":[{"note":"Must include 'plugin:' prefix in extends array as per ESLint plugin config naming convention.","wrong":"extends: ['ghost/node']","symbol":"plugin:ghost/[config]","correct":"extends: ['plugin:ghost/node']"},{"note":"ESLint automatically resolves 'ghost' to 'eslint-plugin-ghost' in plugins array; use short name.","wrong":"plugins: ['eslint-plugin-ghost']","symbol":"ghost (plugin)","correct":"plugins: ['ghost']"},{"note":"This package is CJS-only; ES module import is not supported. Use require() even in .eslintrc.cjs files.","wrong":"import plugin from 'eslint-plugin-ghost'","symbol":"require('eslint-plugin-ghost')","correct":"const plugin = require('eslint-plugin-ghost')"}],"quickstart":{"code":"// .eslintrc.js\nmodule.exports = {\n    plugins: ['ghost'],\n    extends: [\n        'plugin:ghost/node',\n    ],\n    rules: {\n        // override rules here\n    }\n};\n","lang":"javascript","description":"Shows basic setup with 'ghost' plugin and 'plugin:ghost/node' config for a Node.js project."},"warnings":[{"fix":"Update extends to use 'plugin:ghost/[config]' format.","message":"In v2.x, config names changed from 'plugin:ghost/[type]' to include 'plugin:' prefix. Using old format 'ghost/node' will not work.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Switch to 'plugin:ghost/ember-no-style' or use @ember/eslint-plugin.","message":"Config 'plugin:ghost/ember' is deprecated and will be removed in v4; use 'plugin:ghost/ember-no-style' or migrate to ember-specific plugin.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Use configs like 'plugin:ghost/node-no-style' instead of 'plugin:ghost/node'.","message":"Style 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.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Update ESLint to >=5.11.0.","message":"The plugin assumes you are using ESLint >=5.11.0. Older versions may not support important features like 'plugin:' prefix.","severity":"gotcha","affected_versions":"<5.11.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install eslint-plugin-ghost --save-dev' or 'yarn add eslint-plugin-ghost --dev'.","cause":"Missing npm install of eslint-plugin-ghost in the project.","error":"Error: Cannot find module 'eslint-plugin-ghost'"},{"fix":"Ensure extends is 'plugin:ghost/node' not 'ghost/node' and that the plugin is installed.","cause":"Typo in config name or missing 'plugin:' prefix.","error":"ESLint couldn't find the config \"plugin:ghost/node\". Error: Failed to load plugin 'ghost' from package 'eslint-plugin-ghost'"},{"fix":"Change extends to 'plugin:ghost/node'.","cause":"Omitting 'plugin:' prefix leads to ESLint trying to resolve a non-existent config.","error":"Invalid 'extends' configuration: 'ghost/node'. 'extends' must be a string or array of strings."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}