Shared eslint configurations, useful plugins & custom rules.
Inside of lib/config you'll find a set of configs for different environments + base.js.
Base.js effectively documents our code style. Please make sure any rules you add come with an explanation!
gstenv
is green. See our Dev Environment docs.git clone
this repo & cd
into it as usualyarn install
to install dependencies.Run yarn link
inside of me, and then run yarn link eslint-plugin-ghost
inside of the project you want to lint.
"lint": "eslint . --ext .js --cache"
.eslintrc.js
file, and add the
following code:
module.exports = {
plugins: ['ghost'],
extends: [
'plugin:ghost/[config]',
]
};
[config]
to be E.g. node, browser, test etc depending on what environment you are linting.eslintrc.js
files, nesting them inside the folder they belong to.yarn ship
- yarn ship
Copyright (c) 2013-2023 Ghost Foundation - Released under the MIT license. Ghost and the Ghost Logo are trademarks of Ghost Foundation Ltd. Please see our trademark policy for info on acceptable usage.