mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Updated eslint to make restricted requires clearer
- url service is responsible for many problem requires, and will be removed soon - the same with lib/common/events - excluding these leaves us with a handful of much harder to solve requires clearly indicated
This commit is contained in:
parent
81fdde05b9
commit
bd4000e7f7
1 changed files with 3 additions and 2 deletions
|
@ -51,7 +51,7 @@ module.exports = {
|
|||
// },
|
||||
// These are critical refactoring issues that we need to tackle ASAP
|
||||
{
|
||||
name: path.resolve(__dirname, 'core/server/**'),
|
||||
name: [path.resolve(__dirname, 'core/server/**'), `!${path.resolve(__dirname, 'core/server/lib/common/**')}`],
|
||||
message: 'Invalid require of core/server from core/frontend.'
|
||||
}
|
||||
]]
|
||||
|
@ -62,7 +62,8 @@ module.exports = {
|
|||
rules: {
|
||||
'ghost/node/no-restricted-require': ['off', [
|
||||
{
|
||||
name: path.resolve(__dirname, 'core/frontend/**'),
|
||||
// Throw an error for all requires of the frontend, _except_ the url service which will be moved soon
|
||||
name: [path.resolve(__dirname, 'core/frontend/**'), `!${path.resolve(__dirname, 'core/frontend/services/url/**')}`],
|
||||
message: 'Invalid require of core/frontend from core/server.'
|
||||
}
|
||||
]]
|
||||
|
|
Loading…
Add table
Reference in a new issue