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

build: refactor tsconfig & eslint config #544

Merged
merged 1 commit into from
Sep 21, 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
6 changes: 3 additions & 3 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import globals from 'globals';
import prettier from 'eslint-plugin-prettier/recommended';
import prettierPlugin from 'eslint-plugin-prettier/recommended';
// @ts-ignore
import jest from 'eslint-plugin-jest';

const jestFiles = ['packages/*/test/**/*', 'packages/**/*.spec.ts'];
const jestFiles = ['packages/*/test/**/*', 'packages/*/lib/**/*.spec.ts'];

export default tseslint.config(
{
Expand All @@ -22,7 +22,7 @@ export default tseslint.config(
files: jestFiles,
...jest.configs['flat/style']
},
prettier,
prettierPlugin,
{
languageOptions: {
globals: {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"@commitlint/cli": "19.5.0",
"@commitlint/config-conventional": "19.5.0",
"@eslint/js": "9.10.0",
"@eslint/js": "9.11.0",
"@nestjs/common": "10.4.3",
"@nestjs/core": "10.4.3",
"@nestjs/platform-fastify": "10.4.3",
Expand All @@ -22,7 +22,7 @@
"@types/jest": "29.5.13",
"@types/node": "20.16.5",
"concurrently": "9.0.1",
"eslint": "9.10.0",
"eslint": "9.11.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-jest": "28.8.3",
"eslint-plugin-prettier": "5.2.1",
Expand Down
7 changes: 3 additions & 4 deletions packages/node-redis/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"extends": "../tsconfig.build.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"baseUrl": ".",
"outDir": "./dist",
"outDir": "dist",
"paths": {
"@/*": ["lib/*"]
"@/*": ["./lib/*"]
}
},
"include": ["lib", "test"],
Expand Down
3 changes: 1 addition & 2 deletions packages/redis-health/test/cluster/e2e/health.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Test, TestingModule } from '@nestjs/testing';
import { NestFastifyApplication, FastifyAdapter } from '@nestjs/platform-fastify';
import { FastifyInstance } from 'fastify';
import { AppModule } from '../src/app.module';

describe('HealthController (e2e)', () => {
Expand All @@ -12,7 +11,7 @@ describe('HealthController (e2e)', () => {
}).compile();
app = module.createNestApplication<NestFastifyApplication>(new FastifyAdapter());
await app.init();
await (app.getHttpAdapter().getInstance() as FastifyInstance).ready();
await app.getHttpAdapter().getInstance().ready();
});

afterAll(async () => {
Expand Down
3 changes: 1 addition & 2 deletions packages/redis-health/test/redis/e2e/health.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Test, TestingModule } from '@nestjs/testing';
import { NestFastifyApplication, FastifyAdapter } from '@nestjs/platform-fastify';
import { FastifyInstance } from 'fastify';
import { AppModule } from '../src/app.module';

describe('HealthController (e2e)', () => {
Expand All @@ -12,7 +11,7 @@ describe('HealthController (e2e)', () => {
}).compile();
app = module.createNestApplication<NestFastifyApplication>(new FastifyAdapter());
await app.init();
await (app.getHttpAdapter().getInstance() as FastifyInstance).ready();
await app.getHttpAdapter().getInstance().ready();
});

afterAll(async () => {
Expand Down
7 changes: 3 additions & 4 deletions packages/redis-health/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"extends": "../tsconfig.build.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"baseUrl": ".",
"outDir": "./dist",
"outDir": "dist",
"paths": {
"@/*": ["../redis/lib/*"],
"@health/*": ["lib/*"]
"@health/*": ["./lib/*"]
}
},
"include": ["lib", "test"],
Expand Down
7 changes: 3 additions & 4 deletions packages/redis/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"extends": "../tsconfig.build.json",
"extends": "../tsconfig.base.json",
"compilerOptions": {
"baseUrl": ".",
"outDir": "./dist",
"outDir": "dist",
"paths": {
"@/*": ["lib/*"]
"@/*": ["./lib/*"]
}
},
"include": ["lib", "test"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
"declaration": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "ES2021",
"lib": ["ES2023"],
"esModuleInterop": true,
"importHelpers": true,
"strict": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
"skipLibCheck": true
}
}
Loading