Upgraded no-restricted-require in shared rule to error

- We should not require server or frontend files inside the shared libraries as these are intended to be required FROM the server and frontend components
- Now that we've resolved the two outstanding warnings, make this an error so we can't regress on this easily
This commit is contained in:
Hannah Wolfe 2021-05-26 12:34:39 +01:00
parent 3b366dc55d
commit 576f1438ee
No known key found for this signature in database
GPG Key ID: 9F8C7532D0A6BA55

View File

@ -31,7 +31,7 @@ module.exports = {
{ {
files: 'core/shared/**', files: 'core/shared/**',
rules: { rules: {
'ghost/node/no-restricted-require': ['warn', [ 'ghost/node/no-restricted-require': ['error', [
{ {
name: path.resolve(__dirname, 'core/server/**'), name: path.resolve(__dirname, 'core/server/**'),
message: 'Invalid require of core/server from core/shared.' message: 'Invalid require of core/server from core/shared.'