Ghost/.eslintrc.json
Hannah Wolfe 7bce05ab86 Added custom no-cross-requires eslint rule [soft]
refs: 7e787ef807

- bumps eslint-plugin-ghost to 2.1.0 which adds the code for a new custom rule
- adds configuration to our eslint file to enable the rule in a very soft mode for now
- this rule is intended to enforce not tightly coupling the server and frontend
- the intention is to make it stricter over time as the number of cross requires reduces
- enabling this rule temporarily and running lint is a nice way to grok just how tightly coupled things are at the moment
2021-04-26 15:06:57 +01:00

21 lines
540 B
JSON

{
"env": {
"es6": true,
"node": true
},
"plugins": [
"ghost"
],
"extends": [
"plugin:ghost/node"
],
"rules": {
// @TODO: remove this rule once it's turned into "error" in the base plugin
"no-shadow": "error",
"no-var": "error",
"one-var": [2, "never"],
// @TODO: enable this for all components once it gets a bit quieter
"ghost/ghost-custom/no-cross-requires": ["warn", {"shared": true, "server": false, "frontend": false}]
}
}