Skip to content

Commit

Permalink
fix Redis eslint error
Browse files Browse the repository at this point in the history
  • Loading branch information
RamRamez committed Jun 8, 2024
1 parent d165b3a commit d6ad583
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 86 deletions.
3 changes: 0 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"unused-imports/no-unused-imports": "error",
"no-prototype-builtins":"warn",
"@typescript-eslint/no-unused-vars": [
"error", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/consistent-type-definitions":"off",
"@typescript-eslint/no-var-requires":"warn",
"prettier/prettier": [
"error",
{
Expand Down
154 changes: 78 additions & 76 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"test": "NODE_ENV=test mocha -t 30000 --exit -r ts-node/register ./test/pre-test-scripts.ts ./src/**/*.test.ts ./src/**/**/*.test.ts",
"test:notificationRepository": "NODE_ENV=test mocha -t 30000 --exit -r ts-node/register ./test/pre-test-scripts.ts ./src/repositories/notificationRepository.test.ts ",
"test:notificationSettingRepository": "NODE_ENV=test mocha -t 30000 --exit -r ts-node/register ./test/pre-test-scripts.ts ./src/repositories/notificationSettingRepository.test.ts ",
"eslint": "eslint {src,test,migrations}/**/*.ts",
"eslint:fix": "eslint --fix {src,test,migrations}/**/*.ts",
"lint": "eslint {src,test,migrations}/**/*.ts",
"lint:fix": "eslint --fix {src,test,migrations}/**/*.ts",
"db:migrate:run:local": "NODE_ENV=development npx typeorm-ts-node-commonjs migration:run -d ./src/dataSource.ts ",
"db:migrate:run:staging": "NODE_ENV=staging npx typeorm-ts-node-esm migration:run -d ./src/dataSource.ts ",
"db:migrate:revert:local": "NODE_ENV=development npx typeorm-ts-node-esm migration:revert -d ./src/dataSource.ts ",
Expand All @@ -28,7 +28,7 @@
"license": "ISC",
"husky": {
"hooks": {
"pre-commit": "npm run eslint"
"pre-commit": "npm run lint"
}
},
"dependencies": {
Expand All @@ -47,7 +47,7 @@
"express": "4.17.3",
"express-formidable": "1.2.0",
"express-session": "1.17.2",
"ioredis": "^4.28.5",
"ioredis": "^5.4.1",
"joi": "17.6.0",
"jsonwebtoken": "^8.5.1",
"moment": "^2.29.1",
Expand Down
4 changes: 1 addition & 3 deletions src/services/redis.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { RedisOptions } from 'ioredis';
// tslint:disable-next-line:no-var-requires
const Redis = require('ioredis');
import { RedisOptions, Redis } from 'ioredis';
export const redisConfig: RedisOptions = {
port: Number(process.env.REDIS_PORT) || 6379,
host: process.env.REDIS_HOST || 'localhost',
Expand Down

0 comments on commit d6ad583

Please sign in to comment.