Skip to content

Commit bbe709e

Browse files
chore: preserve existing import order in Oxc migration
1 parent b3e5f86 commit bbe709e

29 files changed

Lines changed: 411 additions & 64 deletions

File tree

‎.oxfmtrc.json‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,6 @@
1111
"bracketSameLine": false,
1212
"arrowParens": "avoid",
1313
"sortPackageJson": false,
14-
"sortImports": {
15-
"groups": [
16-
"builtin",
17-
"external",
18-
"internal",
19-
["sibling", "parent"],
20-
"index",
21-
"unknown"
22-
],
23-
"newlinesBetween": true,
24-
"order": "asc",
25-
"ignoreCase": true
26-
},
2714
"ignorePatterns": [
2815
"pnpm-lock.yaml",
2916
"packages/node/src/api-links/__tests__/fixtures/",

‎.oxlintrc.json‎

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
"plugins": ["import"],
44
"jsPlugins": [
55
"eslint-plugin-react-x",
6+
{
7+
"name": "import-x-js",
8+
"specifier": "eslint-plugin-import-x"
9+
},
610
{
711
"name": "jsdoc-js",
812
"specifier": "eslint-plugin-jsdoc"
@@ -144,7 +148,25 @@
144148
"curly": ["error", "all"],
145149
"import/namespace": "off",
146150
"import/no-named-as-default": "off",
147-
"import/no-named-as-default-member": "off"
151+
"import/no-named-as-default-member": "off",
152+
"import-x-js/order": [
153+
"error",
154+
{
155+
"groups": [
156+
"builtin",
157+
"external",
158+
"internal",
159+
["sibling", "parent"],
160+
"index",
161+
"unknown"
162+
],
163+
"newlines-between": "always",
164+
"alphabetize": {
165+
"order": "asc",
166+
"caseInsensitive": true
167+
}
168+
}
169+
]
148170
},
149171
"jsPlugins": ["eslint-plugin-react-x"],
150172
"globals": {

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"@types/node": "~24.10.1",
3737
"@types/semver": "~7.8.0",
3838
"c8": "~12.0.0",
39+
"eslint-plugin-import-x": "4.17.1",
3940
"eslint-plugin-jsdoc": "64.3.1",
4041
"eslint-plugin-react-x": "5.18.6",
4142
"husky": "9.1.7",

‎packages/core/src/generators/metadata/types.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { Root, Node, Data, Blockquote, Heading } from 'mdast';
21
import type { Position } from 'unist';
2+
import type { Root, Node, Data, Blockquote, Heading } from 'mdast';
33

44
export type Generator = GeneratorMetadata<
55
{},

‎packages/core/src/utils/configuration/types.d.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { SemVer } from 'semver';
2-
32
import type { ReleaseEntry } from '#parsers/types';
43

54
export type Configuration = {

‎packages/node-legacy/src/legacy-html-all/index.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

3-
import legacyHtml from '../legacy-html/index.mjs';
43
import { generate } from './generate.mjs';
4+
import legacyHtml from '../legacy-html/index.mjs';
55

66
/**
77
* This generator generates the legacy HTML pages of the legacy API docs

‎packages/node-legacy/src/legacy-json/generate.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import getConfig from '@doc-kit/core/utils/configuration/index.mjs';
66
import { writeFile, withExt } from '@doc-kit/core/utils/file.mjs';
77
import { groupNodesByModule } from '@doc-kit/core/utils/generators.mjs';
88

9-
import { legacyToJSON } from '../utils/legacyToJSON.mjs';
109
import { createSectionBuilder } from './utils/buildSection.mjs';
10+
import { legacyToJSON } from '../utils/legacyToJSON.mjs';
1111

1212
const buildSection = createSectionBuilder();
1313

‎packages/node-legacy/src/legacy-json/types.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { ListItem } from '@types/mdast';
12
import { MetadataEntry } from '@doc-kit/core/generators/metadata/types';
23
import { MethodSignature } from '@doc-kit/core/utils/signature/types';
3-
import { ListItem } from '@types/mdast';
44

55
/**
66
* Contains metadata related to changes, additions, removals, and deprecated statuses of an entry.

‎packages/node/src/man-page/utils/__tests__/converter.test.mjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const textNode = text => u('text', text);
1414

1515
const createMockElement = (headingText, description) => ({
1616
heading: { data: { text: headingText } },
17-
// oxlint-disable-next-line no-sparse-arrays
17+
// eslint-disable-next-line no-sparse-arrays
1818
content: u('root', [, u('paragraph', [textNode(description)])]),
1919
});
2020

‎packages/react/src/html/types.d.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
import type { PageCode } from '../jsx-ast/types';
12
import type { GlobalConfiguration } from '@doc-kit/core/utils/configuration/types';
2-
import type NavBar from '@node-core/ui-components/Containers/NavBar';
33
import type SideBar from '@node-core/ui-components/Containers/Sidebar';
4+
import type NavBar from '@node-core/ui-components/Containers/NavBar';
45
import type { ComponentProps } from 'preact';
56

6-
import type { PageCode } from '../jsx-ast/types';
7-
87
// An attribute bag rendered into an HTML tag. `true` becomes a valueless
98
// attribute (e.g. `crossorigin`); `false`/`null`/`undefined` are omitted.
109
export type TagAttributes = Record<

0 commit comments

Comments
 (0)