From d548c9529b3336d9f0dddeef247ca2f81d893a6e Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Mon, 7 Oct 2024 13:43:43 -0700 Subject: [PATCH 1/2] feat: Don't require default export for single-export modules --- .eslintrc.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index d691689a..e43fe8cf 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -52,6 +52,10 @@ module.exports = { }, ], 'arrow-parens': 'off', + // Avoiding default exports is recommended (https://dev.to/phuocng/avoid-using-default-exports-a1c) + // but we had 'prefer-default-export' on for a long time so we can't turn on 'no-default-export' without causing + // a large refactor. + 'import/prefer-default-export': 'off', 'jsx-a11y/label-has-associated-control': ['error', { labelComponents: [], labelAttributes: [], From e9f470b6da769281ee79315c9792ed9b2242e129 Mon Sep 17 00:00:00 2001 From: Braden MacDonald Date: Mon, 7 Oct 2024 13:45:45 -0700 Subject: [PATCH 2/2] feat: Turn off the 'no-restricted-syntax' rule which isn't relevant --- .eslintrc.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index e43fe8cf..8178cf45 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -56,6 +56,8 @@ module.exports = { // but we had 'prefer-default-export' on for a long time so we can't turn on 'no-default-export' without causing // a large refactor. 'import/prefer-default-export': 'off', + // There is no reason to disallow this syntax anymore; we don't use regenerator-runtime in new browsers + 'no-restricted-syntax': 'off', 'jsx-a11y/label-has-associated-control': ['error', { labelComponents: [], labelAttributes: [],