From a1bfa8a119d0e2e81848198a3480c48a1a020d08 Mon Sep 17 00:00:00 2001 From: Ivan <8611739+IRBorisov@users.noreply.github.com> Date: Wed, 20 Nov 2024 21:40:47 +0300 Subject: [PATCH] R: Add frontend linter to script --- scripts/dev/RunLint.ps1 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/dev/RunLint.ps1 b/scripts/dev/RunLint.ps1 index ae972c4b..f3519a28 100644 --- a/scripts/dev/RunLint.ps1 +++ b/scripts/dev/RunLint.ps1 @@ -1,11 +1,14 @@ -# Run coverage analysis +# Run linters + $backend = Resolve-Path -Path "$PSScriptRoot\..\..\rsconcept\backend" +$frontend = Resolve-Path -Path "$PSScriptRoot\..\..\rsconcept\frontend" function RunLinters() { - BackendLint + LintBackend + LintFrontend } -function BackendLint() { +function LintBackend() { $pylint = "$backend\venv\Scripts\pylint.exe" $mypy = "$backend\venv\Scripts\mypy.exe" @@ -15,4 +18,9 @@ function BackendLint() { & $mypy project apps } +function LintFrontend() { + Set-Location $frontend + & npm run lint +} + RunLinters \ No newline at end of file