mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
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
This commit is contained in:
parent
af2b0b6729
commit
7bce05ab86
3 changed files with 9 additions and 7 deletions
|
@ -10,9 +10,11 @@
|
||||||
"plugin:ghost/node"
|
"plugin:ghost/node"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
// TODO: remove this rule once it's turned into "error" in the base plugin
|
// @TODO: remove this rule once it's turned into "error" in the base plugin
|
||||||
"no-shadow": "error",
|
"no-shadow": "error",
|
||||||
"no-var": "error",
|
"no-var": "error",
|
||||||
"one-var": [2, "never"]
|
"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}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,7 @@
|
||||||
"coffeescript": "2.5.1",
|
"coffeescript": "2.5.1",
|
||||||
"cssnano": "5.0.1",
|
"cssnano": "5.0.1",
|
||||||
"eslint": "7.25.0",
|
"eslint": "7.25.0",
|
||||||
"eslint-plugin-ghost": "2.0.0",
|
"eslint-plugin-ghost": "2.1.0",
|
||||||
"grunt": "1.4.0",
|
"grunt": "1.4.0",
|
||||||
"grunt-bg-shell": "2.3.3",
|
"grunt-bg-shell": "2.3.3",
|
||||||
"grunt-contrib-clean": "2.0.0",
|
"grunt-contrib-clean": "2.0.0",
|
||||||
|
|
|
@ -3152,10 +3152,10 @@ eslint-plugin-ember@9.3.0:
|
||||||
lodash.kebabcase "^4.1.1"
|
lodash.kebabcase "^4.1.1"
|
||||||
snake-case "^3.0.3"
|
snake-case "^3.0.3"
|
||||||
|
|
||||||
eslint-plugin-ghost@2.0.0:
|
eslint-plugin-ghost@2.1.0:
|
||||||
version "2.0.0"
|
version "2.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/eslint-plugin-ghost/-/eslint-plugin-ghost-2.0.0.tgz#14e67180188850abf978df772e02bb74b1832374"
|
resolved "https://registry.yarnpkg.com/eslint-plugin-ghost/-/eslint-plugin-ghost-2.1.0.tgz#811402f32e6339be526368b1ce1b3b4be26a2e4d"
|
||||||
integrity sha512-BlygF0CZr/38ena3qztpyCuo7z1KsbbjEz0FO3zjfg+V6Id5wcZsKTaOdFHFZwyDl4kBm5jujFAsWILh/DtNiQ==
|
integrity sha512-zeAFtxthQ8GaC1LV4e+n6DMfLfl8AEAagYT63SQ1jYzYykK4Wmh0xEADMR0tZFl8eHzTornAyQWmWSwS7CUkXQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
eslint-plugin-ember "9.3.0"
|
eslint-plugin-ember "9.3.0"
|
||||||
eslint-plugin-mocha "8.0.0"
|
eslint-plugin-mocha "8.0.0"
|
||||||
|
|
Loading…
Reference in a new issue