From 65ea84c67b7a09dac63b43769f5fd3e4aa9ae3fe Mon Sep 17 00:00:00 2001 From: Jiuqing Song Date: Wed, 20 Mar 2024 11:20:32 -0700 Subject: [PATCH] Add eslint rule to disallow default export (#2515) --- .eslintrc.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 62b68460026..ec55b455982 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -150,5 +150,20 @@ module.exports = { 'prefer-const': 'error', 'no-var': 'error', 'etc/no-const-enum': ['error', { allowLocal: true }], + 'import/no-default-export': 'error', }, + overrides: [ + { + files: [ + 'roosterjs-editor-*/**/*.ts', + 'roosterjs-react/**/*.ts', + 'roosterjs-react/**/*.tsx', + 'roosterjs-color-utils/**/*.ts', + 'roosterjs/**/*.ts', + ], + rules: { + 'import/no-default-export': 'off', + }, + }, + ], };