From a0047184d7fa0d15de554567dad2fb4ff71a3e10 Mon Sep 17 00:00:00 2001 From: Plastikmensch Date: Thu, 13 Jul 2023 21:36:23 +0200 Subject: [PATCH] Add eslint rule to forbid vanilla imports in glitch (#2293) Signed-off-by: Plastikmensch --- .eslintrc.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 62e862fc9c..60d2ad6169 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -261,6 +261,18 @@ module.exports = { }, ], + // Forbid imports from vanilla in glitch flavour + 'import/no-restricted-paths': [ + 'error', + { + zones: [{ + target: 'app/javascript/flavours/glitch/', + from: 'app/javascript/mastodon/', + message: 'Import from /flavours/glitch/ instead' + }] + } + ], + 'promise/always-return': 'off', 'promise/catch-or-return': [ 'error',