From 95ee08549f6c7e61633c56db32bb2363c278f9eb Mon Sep 17 00:00:00 2001 From: Michael Hudson Nkotagu Date: Fri, 25 Oct 2024 12:55:06 +0300 Subject: [PATCH] chore: Explicitly allow js and tsx files to be imported without extensions --- apps/civicsignalblog/.eslintrc.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/apps/civicsignalblog/.eslintrc.js b/apps/civicsignalblog/.eslintrc.js index ba1843094..4c66c3da2 100644 --- a/apps/civicsignalblog/.eslintrc.js +++ b/apps/civicsignalblog/.eslintrc.js @@ -3,6 +3,15 @@ module.exports = { extends: ["eslint-config-commons-ui/next"], rules: { "react/jsx-filename-extension": [1, { extensions: [".js", ".tsx"] }], // This rule allows JSX syntax in both .js and tsx files + // Disable requirement for importing file extensions for js and tsx files, without this we cant import custom components in Payload + "import/extensions": [ + "error", + "ignorePackages", + { + js: "never", + tsx: "never", + }, + ], }, settings: { "import/resolver": {