Skip to content

Commit c88d558

Browse files
committed
style: run formatting
1 parent 0f90b4b commit c88d558

File tree

6 files changed

+34
-12
lines changed

6 files changed

+34
-12
lines changed

src/api-parser-v2.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { dirname, join } from 'pathe';
88
import { compile } from 'stylis';
99

1010
import { apiv2 as userAgents } from '../data/user-agents.json';
11-
import type { } from './api-gen';
1211
import { APIDirect, APIv2 } from './data';
1312
import type { APIResponse, FontObjectV2 } from './types';
1413
import { orderObject, weightListGen } from './utils';

src/axis-gen.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import got from 'got';
55
import stringify from 'json-stringify-pretty-compact';
66
import * as fs from 'node:fs/promises';
77
import { fileURLToPath } from 'node:url';
8-
import {dirname,join} from 'pathe';
8+
import { dirname, join } from 'pathe';
99

1010
interface AxisProto {
1111
name: string;
@@ -59,7 +59,14 @@ const getDirectory = async (key?: string) => {
5959
const downloadAxis = async (axis: AxisProto): Promise<AxisObject> => {
6060
const response = await got(axis.download_url).text();
6161

62-
const acceptedTags = new Set(['tag', 'display_name', 'min_value', 'max_value', 'default_value', 'precision']);
62+
const acceptedTags = new Set([
63+
'tag',
64+
'display_name',
65+
'min_value',
66+
'max_value',
67+
'default_value',
68+
'precision',
69+
]);
6370

6471
const lines = response.split('\n').filter((line) => {
6572
const tag = line.split(':')[0].trim();

src/cli.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,13 @@ cli
8989
await parseLicenses();
9090
}
9191

92-
if (!options.v1 && !options.v2 && !options.variable && !options.license && !options.axisRegistry) {
92+
if (
93+
!options.v1 &&
94+
!options.v2 &&
95+
!options.variable &&
96+
!options.license &&
97+
!options.axisRegistry
98+
) {
9399
if (options.force) {
94100
consola.info(
95101
`Parsing all metadata... ${colors.bold(colors.red('[FORCE]'))}`

src/data.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,24 @@ const APILicense = JSON.parse(
105105
) as Licenses;
106106

107107
/**
108-
* This returns the axis registry of the supported Google Font variable axes.
109-
* {@link https://github.com/googlefonts/axisregistry}
110-
*
111-
* @remarks This can be updated using `npx gfm parse --registry`.
112-
*/
108+
* This returns the axis registry of the supported Google Font variable axes.
109+
* {@link https://github.com/googlefonts/axisregistry}
110+
*
111+
* @remarks This can be updated using `npx gfm parse --registry`.
112+
*/
113113
const APIRegistry = JSON.parse(
114114
fs.readFileSync(
115115
join(dirname(fileURLToPath(import.meta.url)), '../data/axis-registry.json'),
116116
'utf8'
117117
)
118118
) as AxesObject[];
119119

120-
export { APIDirect, APILicense, APIRegistry,APIv1, APIv2, APIVariable, APIVariableDirect };
120+
export {
121+
APIDirect,
122+
APILicense,
123+
APIRegistry,
124+
APIv1,
125+
APIv2,
126+
APIVariable,
127+
APIVariableDirect,
128+
};

src/types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,10 @@ export interface AxesObject {
104104
export const getAxes = () => {
105105
const data = JSON.parse(
106106
fs.readFileSync(
107-
join(dirname(fileURLToPath(import.meta.url)), '../data/axis-registry.json'),
107+
join(
108+
dirname(fileURLToPath(import.meta.url)),
109+
'../data/axis-registry.json'
110+
),
108111
'utf8'
109112
)
110113
) as AxesObject[];

tests/api-parser-v2.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ describe('API Parser v2', () => {
4444
describe('Process CSS', () => {
4545
it('Returns valid font object', async () => {
4646
for (const font of APIResponse) {
47-
4847
const css = await fetchAllCSS(font);
4948
expect(processCSS(css, font)).toMatchSnapshot();
5049
}

0 commit comments

Comments
 (0)