Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linting with proper import type #742

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/02-sync-migrator.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import supertest from 'supertest';
import { ChildProcess } from 'child_process';
import type { ChildProcess } from 'child_process';
import { expect } from 'chai';
import { testInit, testDeInit, testLocalServer } from './lib/test-init';

Expand Down
2 changes: 1 addition & 1 deletion test/03-async-migrator.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import supertest from 'supertest';
import { ChildProcess } from 'child_process';
import type { ChildProcess } from 'child_process';
import { assert, expect } from 'chai';
import { setTimeout } from 'timers';
import { dbModule } from '../src/server-glue/module';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Migrator } from '../../../../src/server-glue/module';
import type { Migrator } from '../../../../src/server-glue/module';

const migration: Migrator.MigrationFn = async (tx) => {
const staticSql = `\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Migrator } from '../../../../src/server-glue/module';
import type { Migrator } from '../../../../src/server-glue/module';

const migration: Migrator.MigrationFn = async (tx) => {
const staticSql = `\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncMigration } from '../../../../../src/migrator/utils';
import type { AsyncMigration } from '../../../../../src/migrator/utils';

const migration: AsyncMigration = {
asyncFn: async (tx, options) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncMigration } from '../../../../../src/migrator/utils';
import type { AsyncMigration } from '../../../../../src/migrator/utils';

const migration: AsyncMigration = {
asyncFn: async (tx) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncMigration } from '../../../../../src/migrator/utils';
import type { AsyncMigration } from '../../../../../src/migrator/utils';

const migration: AsyncMigration = {
asyncFn: async (tx, options) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncMigration } from '../../../../../src/migrator/utils';
import type { AsyncMigration } from '../../../../../src/migrator/utils';

const migration: AsyncMigration = {
asyncFn: async (tx, options) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncMigration } from '../../../../../src/migrator/utils';
import type { AsyncMigration } from '../../../../../src/migrator/utils';

const migration: AsyncMigration = {
asyncFn: async (tx, options) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncMigration } from '../../../../../src/migrator/utils';
import type { AsyncMigration } from '../../../../../src/migrator/utils';

const migration: AsyncMigration = {
asyncSql: `\
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncMigration } from '../../../../../src/migrator/utils';
import type { AsyncMigration } from '../../../../../src/migrator/utils';

const migration: AsyncMigration = {
asyncFn: async (tx, options) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncMigration } from '../../../../../src/migrator/utils';
import type { AsyncMigration } from '../../../../../src/migrator/utils';

const migration: AsyncMigration = {
asyncFn: async (tx, options) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncMigration } from '../../../../../src/migrator/utils';
import type { AsyncMigration } from '../../../../../src/migrator/utils';

const migration: AsyncMigration = {
asyncFn: async (tx) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncMigration } from '../../../../../src/migrator/utils';
import type { AsyncMigration } from '../../../../../src/migrator/utils';

const migration: AsyncMigration = {
asyncFn: async (tx, options) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AsyncMigration } from '../../../../src/migrator/utils';
import type { AsyncMigration } from '../../../../src/migrator/utils';

const migration: AsyncMigration = {
asyncFn: async (tx) => {
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/04-translations/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AbstractSqlQuery } from '@balena/abstract-sql-compiler';
import type { AbstractSqlQuery } from '@balena/abstract-sql-compiler';
import { getAbstractSqlModelFromFile } from '../../../src/bin/utils';
import type { ConfigLoader } from '../../../src/server-glue/module';

Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/04-translations/translations/v1/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ConfigLoader } from '../../../../../src/server-glue/module';
import type { ConfigLoader } from '../../../../../src/server-glue/module';
import { getAbstractSqlModelFromFile } from '../../../../../src/bin/utils';
import { AbstractSqlQuery } from '@balena/abstract-sql-compiler';
import type { AbstractSqlQuery } from '@balena/abstract-sql-compiler';

export const toVersion = 'v2';

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/04-translations/translations/v2/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ConfigLoader } from '../../../../../src/server-glue/module';
import { getAbstractSqlModelFromFile } from '../../../../../src/bin/utils';
import {
import type {
AbstractSqlQuery,
SelectQueryNode,
} from '@balena/abstract-sql-compiler';
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/04-translations/translations/v3/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { ConfigLoader } from '../../../../../src/server-glue/module';
import { getAbstractSqlModelFromFile } from '../../../../../src/bin/utils';
import { AbstractSqlQuery } from '@balena/abstract-sql-compiler';
import type { AbstractSqlQuery } from '@balena/abstract-sql-compiler';

export const v3AbstractSqlModel = getAbstractSqlModelFromFile(
__dirname + '/university.sbvr',
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/05-request-cancellation/routes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import express from 'express';
import type express from 'express';
import onFinished from 'on-finished';
import * as pine from '../../../src/server-glue/module';
import { handleHttpErrors } from '../../../src/sbvr-api/sbvr-utils';
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/06-webresource/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { ConfigLoader } from '../../../src/server-glue/module';
import { WebResourceHandler } from '../../../src/webresource-handler';
import type { WebResourceHandler } from '../../../src/webresource-handler';
import { S3Handler } from '../../../src/webresource-handler/handlers/S3Handler';
import { v1AbstractSqlModel, v1Translations } from './translations/v1';
import { requiredVar, intVar } from '@balena/env-parsing';
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/06-webresource/translations/v1/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ConfigLoader } from '../../../../../src/server-glue/module';
import type { ConfigLoader } from '../../../../../src/server-glue/module';
import { getAbstractSqlModelFromFile } from '../../../../../src/bin/utils';

export const toVersion = 'example';
Expand Down
3 changes: 2 additions & 1 deletion test/lib/pine-in-process.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { exit } from 'process';
import { init, PineTestOptions } from './pine-init';
import type { PineTestOptions } from './pine-init';
import { init } from './pine-init';

export async function forkInit() {
try {
Expand Down
5 changes: 3 additions & 2 deletions test/lib/test-init.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { ChildProcess, fork } from 'child_process';
import type { ChildProcess } from 'child_process';
import { fork } from 'child_process';
import { boolVar } from '@balena/env-parsing';
import type { PineTestOptions } from './pine-init';
import { OptionalField } from '../../src/sbvr-api/common-types';
import type { OptionalField } from '../../src/sbvr-api/common-types';
export const listenPortDefault = 1337;
export const testLocalServer = `http://localhost:${listenPortDefault}`;

Expand Down
Loading