Skip to content

Commit 37ad3c9

Browse files
committed
Enforce sort order for multiple import members using ESLint
1 parent 742ece0 commit 37ad3c9

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,6 +1368,14 @@ module.exports = {
13681368
},
13691369
],
13701370
'import/no-duplicates': ['error'],
1371+
'sort-imports': [
1372+
// This rule sorts imports of multiple members (destructured imports)
1373+
'error',
1374+
{
1375+
ignoreCase: true,
1376+
ignoreDeclarationSort: true,
1377+
},
1378+
],
13711379
},
13721380
},
13731381

x-pack/plugins/security/public/management/roles/edit_role/edit_role_page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ import type {
4949
RoleIndexPrivilege,
5050
} from '../../../../common/model';
5151
import {
52-
copyRole,
53-
getExtendedRoleDeprecationNotice,
5452
isRoleDeprecated as checkIfRoleDeprecated,
5553
isRoleReadOnly as checkIfRoleReadOnly,
5654
isRoleReserved as checkIfRoleReserved,
55+
copyRole,
56+
getExtendedRoleDeprecationNotice,
5757
prepareRoleClone,
5858
} from '../../../../common/model';
5959
import type { UserAPIClient } from '../../users';

x-pack/plugins/security/server/authorization/privileges/privileges.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
import { uniq } from 'lodash';
99

1010
import type {
11-
KibanaFeature,
1211
PluginSetupContract as FeaturesPluginSetup,
12+
KibanaFeature,
1313
} from '../../../../features/server';
1414
import type { SecurityLicense } from '../../../common/licensing';
1515
import type { RawKibanaPrivileges } from '../../../common/model';

x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_action.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import React, { useMemo } from 'react';
99

1010
import { i18n } from '@kbn/i18n';
1111
import type { SavedObjectsManagementRecord } from 'src/plugins/saved_objects_management/public';
12-
import type { SpacesApiUi, ShareToSpaceFlyoutProps } from 'src/plugins/spaces_oss/public';
12+
import type { ShareToSpaceFlyoutProps, SpacesApiUi } from 'src/plugins/spaces_oss/public';
1313

1414
import { SavedObjectsManagementAction } from '../../../../../src/plugins/saved_objects_management/public';
1515

x-pack/plugins/spaces/public/share_saved_objects_to_space/share_saved_objects_to_space_column.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import React, { useMemo } from 'react';
99

1010
import { i18n } from '@kbn/i18n';
1111
import type { SavedObjectsManagementColumn } from 'src/plugins/saved_objects_management/public';
12-
import type { SpacesApiUi, SpaceListProps } from 'src/plugins/spaces_oss/public';
12+
import type { SpaceListProps, SpacesApiUi } from 'src/plugins/spaces_oss/public';
1313

1414
interface WrapperProps {
1515
spacesApiUi: SpacesApiUi;

x-pack/plugins/spaces/public/spaces_context/wrapper_internal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import type { SpacesContextProps } from 'src/plugins/spaces_oss/public';
1414
import type { SpacesManager } from '../spaces_manager';
1515
import type { ShareToSpacesData, ShareToSpaceTarget } from '../types';
1616
import { createSpacesReactContext } from './context';
17-
import type { SpacesReactContext, InternalProps } from './types';
17+
import type { InternalProps, SpacesReactContext } from './types';
1818

1919
interface Services {
2020
application: ApplicationStart;

0 commit comments

Comments
 (0)