From 7e46ce9c5fb73c72d219105ade6a3cfc482a21c7 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Wed, 2 Apr 2025 20:31:40 +0200 Subject: [PATCH] fix: Linting op Actions --- .github/workflows/lint-action.yml | 4 ++-- .gitignore | 2 +- .../learning-path/learning-path-service.test.ts | 2 +- eslint.config.ts | 13 +++++++++++-- package-lock.json | 4 ++-- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint-action.yml b/.github/workflows/lint-action.yml index 32823417..7fd77d28 100644 --- a/.github/workflows/lint-action.yml +++ b/.github/workflows/lint-action.yml @@ -43,6 +43,6 @@ jobs: with: auto_fix: true eslint: true - eslint_args: '--config eslint.config.ts' + eslint_args: "--config eslint.config.ts --ignore-pattern '**/prettier.config.js'" prettier: true - commit_message: 'style: fix linting issues met ${linter}' \ No newline at end of file + commit_message: 'style: fix linting issues met ${linter}' diff --git a/.gitignore b/.gitignore index d28e7d73..d3905d1f 100644 --- a/.gitignore +++ b/.gitignore @@ -737,4 +737,4 @@ flycheck_*.el # network security /network-security.data - +docs/.venv diff --git a/backend/tests/services/learning-path/learning-path-service.test.ts b/backend/tests/services/learning-path/learning-path-service.test.ts index 934c677b..4feb3627 100644 --- a/backend/tests/services/learning-path/learning-path-service.test.ts +++ b/backend/tests/services/learning-path/learning-path-service.test.ts @@ -48,7 +48,7 @@ describe('LearningPathService', () => { expect(result.data?.length).toBe(1); // Should include all the nodes, even those pointing to foreign learning objects. - expect([...result.data![0].nodes.map((it) => it.learningobject_hruid)].sort()).toEqual( + expect([...result.data![0].nodes.map((it) => it.learningobject_hruid)].sort((a, b) => a - b)).toEqual( example.learningPath.nodes.map((it) => it.learningObjectHruid).sort() ); }); diff --git a/eslint.config.ts b/eslint.config.ts index 831b213f..12943414 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -16,7 +16,16 @@ export default [ prettierConfig, includeIgnoreFile(gitignorePath), { - ignores: ['**/dist/**', '**/.node_modules/**', '**/coverage/**', '**/.github/**'], + ignores: [ + '**/dist/**', + '**/.node_modules/**', + '**/coverage/**', + '**/.github/**', + '**/prettier.config.js', + 'docs/.venv/**', + 'prettier.config.js', + 'frontend/prettier.config.js' + ], files: ['**/*.ts', '**/*.cts', '**.*.mts'], }, { @@ -205,6 +214,6 @@ export default [ 'no-multi-assign': 'error', 'no-nested-ternary': 'error', 'no-object-constructor': 'error', - }, + } }, ]; diff --git a/package-lock.json b/package-lock.json index 79ebf319..27d261cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "dwengo-1-monorepo", + "name": "dwengo-1", "version": "0.1.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "dwengo-1-monorepo", + "name": "dwengo-1", "version": "0.1.1", "license": "MIT", "workspaces": [