Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dankochetov committed Jun 9, 2024
1 parent d588ac5 commit 1836aa6
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 29 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ plugins:
- unused-imports
- no-instanceof
- drizzle-internal
overrides:
- files:
- '**/tests/**/*.ts'
- '**/type-tests/**/*.ts'
rules:
import/extensions: 'off'
no-instanceof: 'off'
- files: 'eslint-plugin-drizzle/**/*'
rules:
import/extensions: 'off'
rules:
'@typescript-eslint/consistent-type-imports':
- error
Expand All @@ -24,6 +34,10 @@ rules:
import/no-useless-path-segments: error
import/newline-after-import: error
import/no-duplicates: error
import/extensions:
- error
- always
- ignorePackages: true
'@typescript-eslint/no-explicit-any': 'off'
'@typescript-eslint/no-non-null-assertion': 'off'
'@typescript-eslint/no-namespace': 'off'
Expand Down
10 changes: 5 additions & 5 deletions drizzle-orm/src/prisma/mysql/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import type { PrismaClient } from '@prisma/client/extension';

import { Prisma } from '@prisma/client';

import { entityKind } from '~/entity';
import type { Logger } from '~/logger.ts';
import { entityKind } from '~/entity.ts';
import type { Logger } from '~/logger';
import { DefaultLogger } from '~/logger.ts';
import type { QueryResultHKT } from '~/mysql-core';
import { MySqlDatabase, MySqlDialect } from '~/mysql-core';
import type { DrizzleConfig } from '~/utils.ts';
import { MySqlDatabase, MySqlDialect } from '~/mysql-core/index.ts';
import type { DrizzleConfig } from '~/utils';
import type { PrismaMySqlPreparedQueryHKT } from './session';
import { PrismaMySqlSession } from './session';
import { PrismaMySqlSession } from './session.ts';

export class PrismaMySqlDatabase
extends MySqlDatabase<QueryResultHKT, PrismaMySqlPreparedQueryHKT, Record<string, never>>
Expand Down
4 changes: 2 additions & 2 deletions drizzle-orm/src/prisma/mysql/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './driver';
export * from './session';
export * from './driver.ts';
export * from './session.ts';
10 changes: 5 additions & 5 deletions drizzle-orm/src/prisma/mysql/session.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PrismaClient } from '@prisma/client/extension';

import { entityKind } from '~/entity';
import { type Logger, NoopLogger } from '~/logger';
import { entityKind } from '~/entity.ts';
import { type Logger, NoopLogger } from '~/logger.ts';
import type {
MySqlDialect,
MySqlPreparedQueryHKT,
Expand All @@ -10,9 +10,9 @@ import type {
PreparedQueryConfig,
QueryResultHKT,
} from '~/mysql-core';
import { MySqlPreparedQuery, MySqlSession } from '~/mysql-core';
import { fillPlaceholders } from '~/sql';
import type { Query, SQL } from '~/sql';
import { MySqlPreparedQuery, MySqlSession } from '~/mysql-core/index.ts';
import { fillPlaceholders } from '~/sql/sql.ts';
import type { Query, SQL } from '~/sql/sql.ts';
import type { Assume } from '~/utils';

export class PrismaMySqlPreparedQuery<T> extends MySqlPreparedQuery<PreparedQueryConfig & { execute: T }> {
Expand Down
6 changes: 3 additions & 3 deletions drizzle-orm/src/prisma/pg/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import type { PrismaClient } from '@prisma/client/extension';

import { Prisma } from '@prisma/client';

import { entityKind } from '~/entity';
import { entityKind } from '~/entity.ts';
import type { Logger } from '~/logger.ts';
import { DefaultLogger } from '~/logger.ts';
import type { QueryResultHKT } from '~/pg-core';
import { PgDatabase, PgDialect } from '~/pg-core';
import { PgDatabase, PgDialect } from '~/pg-core/index.ts';
import type { DrizzleConfig } from '~/utils.ts';
import { PrismaPgSession } from './session';
import { PrismaPgSession } from './session.ts';

export class PrismaPgDatabase extends PgDatabase<QueryResultHKT, Record<string, never>> {
static readonly [entityKind]: string = 'PrismaPgDatabase';
Expand Down
4 changes: 2 additions & 2 deletions drizzle-orm/src/prisma/pg/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './driver';
export * from './session';
export * from './driver.ts';
export * from './session.ts';
8 changes: 4 additions & 4 deletions drizzle-orm/src/prisma/pg/session.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type { PrismaClient } from '@prisma/client/extension';

import { entityKind } from '~/entity';
import { type Logger, NoopLogger } from '~/logger';
import { entityKind } from '~/entity.ts';
import { type Logger, NoopLogger } from '~/logger.ts';
import type { PgDialect, PgTransaction, PgTransactionConfig, PreparedQueryConfig, QueryResultHKT } from '~/pg-core';
import { PgPreparedQuery, PgSession } from '~/pg-core';
import { fillPlaceholders } from '~/sql';
import { PgPreparedQuery, PgSession } from '~/pg-core/index.ts';
import type { Query, SQL } from '~/sql';
import { fillPlaceholders } from '~/sql/sql.ts';

export class PrismaPgPreparedQuery<T> extends PgPreparedQuery<PreparedQueryConfig & { execute: T }> {
static readonly [entityKind]: string = 'PrismaPgPreparedQuery';
Expand Down
4 changes: 2 additions & 2 deletions drizzle-orm/src/prisma/sqlite/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { Prisma } from '@prisma/client';

import type { Logger } from '~/logger.ts';
import { DefaultLogger } from '~/logger.ts';
import { BaseSQLiteDatabase, SQLiteAsyncDialect } from '~/sqlite-core';
import { BaseSQLiteDatabase, SQLiteAsyncDialect } from '~/sqlite-core/index.ts';
import type { DrizzleConfig } from '~/utils.ts';
import { PrismaSQLiteSession } from '.';
import { PrismaSQLiteSession } from './session.ts';

export type PrismaSQLiteDatabase = BaseSQLiteDatabase<'async', unknown>;

Expand Down
4 changes: 2 additions & 2 deletions drizzle-orm/src/prisma/sqlite/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './driver';
export * from './session';
export * from './driver.ts';
export * from './session.ts';
8 changes: 4 additions & 4 deletions drizzle-orm/src/prisma/sqlite/session.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { PrismaClient } from '@prisma/client/extension';

import { entityKind } from '~/entity';
import { type Logger, NoopLogger } from '~/logger';
import { fillPlaceholders } from '~/sql';
import { entityKind } from '~/entity.ts';
import { type Logger, NoopLogger } from '~/logger.ts';
import type { Query } from '~/sql';
import { fillPlaceholders } from '~/sql/sql.ts';
import type {
PreparedQueryConfig as PreparedQueryConfigBase,
SelectedFieldsOrdered,
Expand All @@ -12,7 +12,7 @@ import type {
SQLiteTransaction,
SQLiteTransactionConfig,
} from '~/sqlite-core';
import { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core';
import { SQLitePreparedQuery, SQLiteSession } from '~/sqlite-core/index.ts';

type PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | 'run'>;

Expand Down

0 comments on commit 1836aa6

Please sign in to comment.