Skip to content

Commit 2e6d750

Browse files
authored
Merge pull request #3414 from SeedCompany/vertbatim
2 parents e630d92 + 64abf85 commit 2e6d750

File tree

881 files changed

+3305
-2837
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

881 files changed

+3305
-2837
lines changed

.eslintrc.cjs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ const restrictedImports = [
8888
path: '@nestjs/platform-fastify',
8989
replacement: { path: '~/core/http' },
9090
},
91+
{
92+
path: 'type-fest',
93+
kind: 'value',
94+
message: 'Be sure to specify the `type` modifier',
95+
},
9196
];
9297

9398
const namingConvention = [
@@ -161,24 +166,20 @@ const namingConvention = [
161166
/** @type {import('@typescript-eslint/utils').TSESLint.Linter.Config} */
162167
const config = {
163168
root: true,
164-
plugins: [
165-
'@seedcompany',
166-
'typescript-sort-keys',
167-
'no-only-tests',
168-
],
169+
plugins: ['@seedcompany', 'typescript-sort-keys', 'no-only-tests'],
169170
extends: ['plugin:@seedcompany/nestjs'],
170171
rules: {
171172
'no-console': 'error',
172173
'no-only-tests/no-only-tests': 'error',
173174
'@typescript-eslint/naming-convention': ['warn', ...namingConvention],
174-
'no-restricted-imports': ['error', { 'paths': oldRestrictedImports }],
175+
'no-restricted-imports': ['error', { paths: oldRestrictedImports }],
175176
'@seedcompany/no-restricted-imports': ['error', ...restrictedImports],
176177
'no-restricted-syntax': [
177178
'error',
178179
...baseConfig.rules['no-restricted-syntax']?.slice(1),
179180
{
180181
selector: 'NewExpression[callee.name="Logger"]',
181-
'message': `
182+
message: `
182183
Inject a logger instead
183184
184185
constructor(
@@ -187,6 +188,14 @@ const config = {
187188
`,
188189
},
189190
],
191+
'@typescript-eslint/consistent-type-imports': [
192+
'error',
193+
{ fixStyle: 'inline-type-imports' },
194+
],
195+
'@typescript-eslint/consistent-type-exports': [
196+
'error',
197+
{ fixMixedExportsWithInlineTypeSpecifier: true },
198+
],
190199
// TODO Enable this and fix errors (both types & logic changes will be needed)
191200
'@typescript-eslint/no-unnecessary-condition': 'off',
192201
},

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ bfed26416fb0bd22aa9437145b081ea4216b9816
2222

2323
# EdgeDB -> Gel
2424
e7bc70f5598d83b7a49306f1726d3bcb45cc9956
25+
26+
# Verbatim module syntax enabled / strict type modifiers
27+
2ac61585bc2a9fb187ddcf50eb3b3c178581d5b7

src/common/and-call.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { FnLike } from '@seedcompany/common';
1+
import { type FnLike } from '@seedcompany/common';
22
import { isPromise } from 'node:util/types';
3-
import { ConditionalKeys } from 'type-fest';
3+
import { type ConditionalKeys } from 'type-fest';
44

55
export const andCall = <
66
T,

src/common/augmented-metadata.pipe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ArgumentMetadata, PipeTransform } from '@nestjs/common';
1+
import { type ArgumentMetadata, type PipeTransform } from '@nestjs/common';
22
import { ServerException } from './exceptions';
33

44
const key = Symbol('AugmentedMetadata');

src/common/context.type.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { OperationDefinitionNode } from 'graphql';
2-
import { BehaviorSubject } from 'rxjs';
1+
import { type OperationDefinitionNode } from 'graphql';
2+
import { type BehaviorSubject } from 'rxjs';
33
import type { IRequest, IResponse } from '~/core/http';
4-
import { Session } from './session';
4+
import { type Session } from './session';
55

66
/**
77
* The type for graphql @Context() decorator

src/common/create-and-inject.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { ModuleRef } from '@nestjs/core';
1+
import { type ModuleRef } from '@nestjs/core';
22
import { pickBy } from 'lodash';
3-
import { Class } from 'type-fest';
3+
import { type Class } from 'type-fest';
44

55
/**
66
* A helper to create an instance of a class and inject dependencies.

src/common/data-object.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AbstractClassType } from './types';
1+
import { type AbstractClassType } from './types';
22

33
/**
44
* A helper class to try to enforce proper usage of data objects.

src/common/db-label.helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { uniq } from 'lodash';
2-
import { AbstractClass } from 'type-fest';
2+
import type { AbstractClass } from 'type-fest';
33
import { DbLabelSymbol } from './db-label.decorator';
44
import { getParentTypes } from './parent-types';
55
import { isResourceClass } from './resource.dto';

src/common/discovery-unique-methods.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { DiscoveredMethodWithMeta } from '@golevelup/nestjs-discovery';
1+
import { type DiscoveredMethodWithMeta } from '@golevelup/nestjs-discovery';
22

33
export const uniqueDiscoveredMethods = <T>(
44
methods: Array<DiscoveredMethodWithMeta<T>>,

src/common/email-field.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { applyDecorators } from '@nestjs/common';
2-
import { Field, FieldOptions } from '@nestjs/graphql';
2+
import { Field, type FieldOptions } from '@nestjs/graphql';
33
import { Transform } from './transform.decorator';
44
import { IsEmail } from './validators';
55

0 commit comments

Comments
 (0)