Skip to content

Commit 6bfc555

Browse files
committed
some lint fixes
Signed-off-by: flakey5 <73616808+flakey5@users.noreply.github.com>
1 parent 1b82eed commit 6bfc555

26 files changed

+86
-35
lines changed

src/generators/index.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import addonVerify from './addon-verify/index.mjs';
44
import apiLinks from './api-links/index.mjs';
55
import astJs from './ast-js/index.mjs';
6+
import json from './json/index.mjs';
7+
import jsonAll from './json-all/index.mjs';
68
import jsonSimple from './json-simple/index.mjs';
79
import jsxAst from './jsx-ast/index.mjs';
810
import legacyHtml from './legacy-html/index.mjs';
@@ -14,8 +16,6 @@ import manPage from './man-page/index.mjs';
1416
import metadata from './metadata/index.mjs';
1517
import oramaDb from './orama-db/index.mjs';
1618
import web from './web/index.mjs';
17-
import json from './json/index.mjs';
18-
import jsonAll from './json-all/index.mjs';
1919

2020
export const publicGenerators = {
2121
'json-simple': jsonSimple,

src/generators/json-all/__tests__/version.test.mjs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
'use strict';
22

3-
import test from 'node:test';
43
import assert from 'node:assert';
5-
import jsonAll from '../../json-all/index.mjs';
6-
import json from '../index.mjs';
4+
import test from 'node:test';
5+
6+
import json from '../../json/index.mjs';
7+
import jsonAll from '../index.mjs';
78
import { generateJsonSchema } from '../util/generateJsonSchema.mjs';
89

910
test('json-all generator matches json generator version match', () => {

src/generators/json-all/index.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import { writeFile } from 'node:fs/promises';
55
import { join } from 'node:path';
6+
67
import { DOC_NODE_VERSION } from '../../constants.mjs';
78
import { generateJsonSchema } from './util/generateJsonSchema.mjs';
89

src/generators/json-all/util/generateJsonSchema.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import jsonAll from '../index.mjs';
55

66
const JSON_SCHEMA_URL = `https://nodejs.org/docs/${DOC_NODE_VERSION}/api/node-doc-schema.json`;
77

8+
/**
9+
*
10+
*/
811
export const generateJsonSchema = () => ({
912
$schema: 'http://json-schema.org/draft-07/schema#',
1013
$id: `nodejs-api-doc-all@v${jsonAll.version}`,

src/generators/json/__tests__/index.test.mjs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
// @ts-check
2-
import { describe, test, before } from 'node:test';
32
import assert from 'node:assert';
43
import { join } from 'node:path';
5-
import { SemVer } from 'semver';
4+
import { describe, test, before } from 'node:test';
5+
66
import { Validator } from 'jsonschema';
7+
import { SemVer } from 'semver';
8+
9+
import createGenerator from '../../../generators.mjs';
710
import createMarkdownLoader from '../../../loaders/markdown.mjs';
811
import createMarkdownParser from '../../../parsers/markdown.mjs';
9-
import createGenerator from '../../../generators.mjs';
1012
import { parseSchema } from '../utils/parseSchema.mjs';
1113

1214
const FIXTURES_DIR = join(import.meta.dirname, 'fixtures');

src/generators/json/__tests__/version.test.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
'use strict';
22

3-
import test from 'node:test';
43
import assert from 'node:assert';
54
import { readFile } from 'node:fs/promises';
65
import { join } from 'node:path';
6+
import test from 'node:test';
7+
78
import { parse as jsoncParse } from 'jsonc-parser';
9+
810
import json from '../index.mjs';
911

1012
test('schema version matches generator version', async () => {

src/generators/json/index.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33

44
import { writeFile } from 'node:fs/promises';
55
import { join } from 'node:path';
6-
import { groupNodesByModule } from '../../utils/generators.mjs';
6+
77
import { createSectionBuilder } from './utils/createSection.mjs';
88
import { parseSchema } from './utils/parseSchema.mjs';
9+
import { groupNodesByModule } from '../../utils/generators.mjs';
910

1011
/**
1112
* This generator is responsible for generating the JSON representation of the

src/generators/json/utils/__tests__/createMethodSection.test.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
// @ts-check
22
'use strict';
33

4-
import { describe, test } from 'node:test';
54
import assert from 'node:assert';
5+
import { describe, test } from 'node:test';
6+
67
import { createParameterGroupings } from '../createMethodSection.mjs';
78

89
describe('createParameterGroupings', () => {

src/generators/json/utils/__tests__/createModuleSection.test.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
'use strict';
22

3-
import { test } from 'node:test';
43
import assert from 'node:assert';
5-
import { createModuleSectionBuilder } from '../createModuleSection.mjs';
4+
import { test } from 'node:test';
5+
66
import { DOC_NODE_VERSION } from '../../../../constants.mjs';
7+
import { createModuleSectionBuilder } from '../createModuleSection.mjs';
78

89
const createModuleSection = createModuleSectionBuilder();
910

src/generators/json/utils/__tests__/createPropertySection.test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// @ts-check
22
'use strict';
33

4-
import test, { describe } from 'node:test';
54
import assert from 'node:assert';
5+
import test, { describe } from 'node:test';
66

77
`
88
#### \`url.username\`

0 commit comments

Comments
 (0)