Skip to content

Commit

Permalink
fix: Correct the pattern of localities
Browse files Browse the repository at this point in the history
  • Loading branch information
im3dabasia committed Feb 28, 2025
1 parent 6b92ec3 commit f6bb902
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions packages/eslint-plugin/rules/dependency-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,10 @@ module.exports = {
if ( needsReordering && candidates.length > 0 ) {
const firstImport = candidates[ 0 ][ 0 ];
const lastImport = candidates[ candidates.length - 1 ][ 0 ];

// Early return if ranges are not available
if ( ! firstImport.range || ! lastImport.range ) {
return;
}

// TypeScript now knows these ranges exist
const startRange = firstImport.range;
const endRange = lastImport.range;

Expand All @@ -354,8 +351,8 @@ module.exports = {
let newText = '';
/** @type {Array<WPPackageLocality>} */
const localities = [
'WordPress',
'External',
'WordPress',
'Internal',
];

Expand Down

0 comments on commit f6bb902

Please sign in to comment.