diff --git a/.eslintrc.js b/.eslintrc.js index e59ad09ae7..38ae387c34 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -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.' } ]]