~cytrogen/masto-fe

a0047184d7fa0d15de554567dad2fb4ff71a3e10 — Plastikmensch 2 years ago 470ded3
Add eslint rule to forbid vanilla imports in glitch (#2293)

Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com>
1 files changed, 12 insertions(+), 0 deletions(-)

M .eslintrc.js
M .eslintrc.js => .eslintrc.js +12 -0
@@ 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',