From 6aa96c11653e3bd46b611d2b7622c159358cc006 Mon Sep 17 00:00:00 2001 From: Daniel Mohns Date: Mon, 13 May 2024 13:14:46 +0200 Subject: [PATCH] DR-767 Increase ESLint rule level (#238) --- .github/workflows/check.yml | 7 ++++++- apps/drec-api/.eslintrc.js | 5 ++--- apps/drec-api/package.json | 5 +++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index bde5e5bd2..4845d6430 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -53,7 +53,12 @@ jobs: run: | rush install - - name: Run ESLint + - name: Run ESLint (error) + working-directory: apps/drec-api + run: pnpm run lint:error + continue-on-error: true + + - name: Run ESLint (all) working-directory: apps/drec-api run: pnpm run lint continue-on-error: true diff --git a/apps/drec-api/.eslintrc.js b/apps/drec-api/.eslintrc.js index b4227b477..7e0d271eb 100755 --- a/apps/drec-api/.eslintrc.js +++ b/apps/drec-api/.eslintrc.js @@ -7,9 +7,8 @@ module.exports = { }, plugins: ['@typescript-eslint/eslint-plugin'], extends: [ - // Temporarily disable `eslint:recommended` until other lint issues have been fixed - // 'eslint:recommended', - // 'plugin:@typescript-eslint/eslint-recommended', + 'eslint:recommended', + 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'prettier', 'prettier/@typescript-eslint', diff --git a/apps/drec-api/package.json b/apps/drec-api/package.json index f7cd36372..19d5b6600 100755 --- a/apps/drec-api/package.json +++ b/apps/drec-api/package.json @@ -21,8 +21,9 @@ "redis:drop": "redis-cli flushall", "prettier": "prettier --check --config-precedence file-override './{src,migrations,test}/**/*'", "prettier:fix": "prettier --write --config-precedence file-override './{src,migrations,test}/**/*'", - "lint": "eslint \"{src,migrations,test}/**/*{.ts,.tsx}\" --no-error-on-unmatched-pattern", - "lint:fix": "eslint \"{src,migrations,test}/**/*{.ts,.tsx}\" --fix --no-error-on-unmatched-pattern", + "lint": "eslint \"{src,migrations,test}/**/*{.ts,.tsx}\"", + "lint:error": "eslint \"{src,migrations,test}/**/*{.ts,.tsx}\" --quiet", + "lint:fix": "eslint \"{src,migrations,test}/**/*{.ts,.tsx}\" --fix", "migrate": "pnpm typeorm:run:issuer && pnpm typeorm:run && pnpm typeorm:run:certificate", "migrate:docker": "pnpm typeorm:run:issuer && node_modules/typeorm/cli.js --config dist/js/ormconfig.js migration:run", "typeorm": "ts-node -r tsconfig-paths/register node_modules/typeorm/cli.js --config ormconfig-dev.ts",