Skip to content

Commit

Permalink
Merge pull request #1844 from woocommerce/dev/prevent-no-duplicates-w…
Browse files Browse the repository at this point in the history
…arnings

Prevent the "import/no-duplicates" warning for the externalization process
  • Loading branch information
eason9487 authored Jan 10, 2023
2 parents 1906b08 + 2d0e0d6 commit e7ab691
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 e7ab691

Please sign in to comment.