Replace ESLint with Biome for linting and formatting, update TypeScript configuration to target ESNext, and refactor code to use type imports. Add new biome.json configuration file and adjust test cases for error handling.

This commit is contained in:
Luke Hagar
2025-09-26 05:28:23 +00:00
parent efed32466f
commit e2ed313ad0
14 changed files with 164 additions and 155 deletions

View File

@@ -220,7 +220,7 @@ describe('Integration Tests', () => {
content: openApiContent
};
// @ts-ignore We are mocking things here
// @ts-expect-error We are mocking things here
const result = jsonPrinter?.print({ getValue: () => testData }, { tabWidth: 2 }, () => '');
expect(result).toBeDefined();
@@ -369,7 +369,7 @@ describe('Integration Tests', () => {
content: swaggerContent
};
// @ts-ignore We are mocking things here
// @ts-expect-error We are mocking things here
const result = jsonPrinter?.print({ getValue: () => testData }, { tabWidth: 2 }, () => '');
expect(result).toBeDefined();
@@ -420,7 +420,7 @@ describe('Integration Tests', () => {
content: yamlContent
};
// @ts-ignore We are mocking things here
// @ts-expect-error We are mocking things here
const result = yamlPrinter?.print({ getValue: () => testData }, { tabWidth: 2 }, () => '');
expect(result).toBeDefined();
@@ -447,7 +447,7 @@ describe('Integration Tests', () => {
const malformedJson = '{"openapi": "3.0.0", "info": {';
// @ts-ignore We are mocking things here
// @ts-expect-error We are mocking things here
expect(() => jsonParser?.parse(malformedJson, {})).toThrow();
});
@@ -457,7 +457,7 @@ describe('Integration Tests', () => {
const malformedYaml = 'openapi: 3.0.0\ninfo:\n title: Test\n version: 1.0.0\n invalid: [';
// @ts-ignore We are mocking things here
// @ts-expect-error We are mocking things here
expect(() => yamlParser?.parse(malformedYaml, {})).toThrow();
});
@@ -467,7 +467,7 @@ describe('Integration Tests', () => {
const nonOpenAPI = '{"name": "John", "age": 30}';
// @ts-ignore We are mocking things here
// @ts-expect-error We are mocking things here
expect(() => jsonParser?.parse(nonOpenAPI, {})).toThrow('Not an OpenAPI file');
});
});
@@ -506,7 +506,7 @@ describe('Integration Tests', () => {
const startTime = Date.now();
// @ts-ignore We are mocking things here
// @ts-expect-error We are mocking things here
const result = jsonPrinter?.print({ getValue: () => testData }, { tabWidth: 2 }, () => '');
const endTime = Date.now();