mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 17:04:59 +03:00
7bce05ab86
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
21 lines
540 B
JSON
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}]
|
|
}
|
|
}
|