Skip to content

Commit

Permalink
Prevent the "import/no-duplicates" warning for the externalization pr…
Browse files Browse the repository at this point in the history
…ocess
  • Loading branch information
eason9487 committed Jan 9, 2023
1 parent 1237f4d commit 2d0e0d6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,14 @@ module.exports = {
additionalHooks: 'useSelect',
},
],
// When a file imports from both `@wordpress/components` and `extracted/@wordpress/components`
// at the same time, it would get the "no-duplicates" warning. It should be considered a
// false positive when working on the externalization process. So here we temporarily change
// to use "no-duplicate-imports" instead.
//
// TODO: After the externalizations of `@wordpress/*` and `@woocommerce/*` are complete,
// remove the following two lines of rule settings.
'import/no-duplicates': 'off',
'no-duplicate-imports': 'warn',
},
};

0 comments on commit 2d0e0d6

Please sign in to comment.