Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jacekradko committed Jan 11, 2025
1 parent 1adb9d0 commit cfe7626
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 2 additions & 4 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,10 @@ export default tseslint.config([
tseslint.configs.recommendedTypeChecked,
pluginRegexp.configs['flat/recommended'],
...configTurbo,
{
// extends: [pluginImport.configs.recommended],
},
pluginImport.flatConfigs.recommended,
// GLOBAL RULES
{
plugins: {
import: pluginImport,
'simple-import-sort': pluginSimpleImportSort,
'unused-imports': pluginUnusedImports,
},
Expand Down Expand Up @@ -200,6 +197,7 @@ export default tseslint.config([
// TYPESCRIPT RULES
{
files: TYPESCRIPT_FILES,
extends: [pluginImport.flatConfigs.recommended, pluginImport.flatConfigs.typescript],
rules: {
'no-unused-vars': 'off',
},
Expand Down
4 changes: 4 additions & 0 deletions packages/fastify/src/test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@ import type { FastifyInstance } from 'fastify';
export function createFastifyInstanceMock() {
const fastify = {
decorateReply: jest.fn((name: string, fn) => {
// @ts-expect-error - TS7053
fastify[name] = fn;
}),
addHook: jest.fn((name: string, fn) => {
// @ts-expect-error - TS7053
fastify[name] = fastify[name] || [];
// @ts-expect-error - TS7053
fastify[name].push(fn);
}),
decorateRequest: jest.fn((name: string, fn) => {
// @ts-expect-error - TS7053
fastify[name] = fn;
}),
} as any as FastifyInstance;
Expand Down
2 changes: 1 addition & 1 deletion packages/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"strict": true,
"types": []
},
"include": ["./src"],
"include": ["src"],
"exclude": ["node_modules"]
}

0 comments on commit cfe7626

Please sign in to comment.