diff --git a/.eslintrc.json b/.eslintrc.json index 557ab350728..1eab87a11e3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,7 +5,7 @@ "rootDir": "./apps/librelingo-web/src" } }, - "ignorePatterns": ["playwright-report"], + "ignorePatterns": ["playwright-report", "apps/librelingo-web/out"], "rules": { "@next/next/no-html-link-for-pages": "off" } diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000000..a84f387b753 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,19 @@ +name: Lint (node) +on: + push: + branches: [main] + pull_request: + branches: [main] +jobs: + test: + timeout-minutes: 60 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Install dependencies + run: npm ci + - name: Run lint checks + run: npm run lint diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 52b66961f32..25e0f477945 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,9 +1,9 @@ name: Playwright Tests on: push: - branches: [main, master] + branches: [main] pull_request: - branches: [main, master] + branches: [main] jobs: test: timeout-minutes: 60 diff --git a/package.json b/package.json index 61169993449..6a777b992c3 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,9 @@ "e2e:test": "playwright test", "e2e:ui": "playwright test --ui", "e2e:report": "playwright show-report", - "lint": "eslint .", + "lint": "npm run lint:eslint && npm run lint:prettier", + "lint:eslint": "eslint .", + "lint:prettier": "npx prettier --check .", "format": "npx prettier . --write", "course:build": "./scripts/exportYamlCourse.sh" },