Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Lint

on:
workflow_dispatch:
push:
branches:
- "main"
- "rc"
- "hotfix-rc"
pull_request:

permissions:
contents: read

jobs:

lint:
name: Run linter
if: ${{ startsWith(github.head_ref, 'version_bump_') == false }}
runs-on: ubuntu-24.04

steps:
- name: Check out repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Get Node version
id: retrieve-node-version
run: |
NODE_NVMRC=$(cat .nvmrc)
NODE_VERSION=${NODE_NVMRC/v/''}
echo "node_version=$NODE_VERSION" >> "$GITHUB_OUTPUT"

- name: Set up Node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
node-version: ${{ steps.retrieve-node-version.outputs.node_version }}

- name: Install Node dependencies
run: npm ci

- name: Run ESLint and Prettier
run: npm run lint
2 changes: 2 additions & 0 deletions src/services/directory-services/gsuite-directory.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
import { GSuiteConfiguration } from "../../models/gsuiteConfiguration";
import { SyncConfiguration } from "../../models/syncConfiguration";
import { UserEntry } from "../../models/userEntry";
import { BaseDirectoryService } from "../baseDirectory.service";

Check failure on line 13 in src/services/directory-services/gsuite-directory.service.ts

View workflow job for this annotation

GitHub Actions / Run linter

There should be at least one empty line between import groups
import { Entry } from "type-fest";

Check failure on line 14 in src/services/directory-services/gsuite-directory.service.ts

View workflow job for this annotation

GitHub Actions / Run linter

'Entry' is defined but never used

Check failure on line 14 in src/services/directory-services/gsuite-directory.service.ts

View workflow job for this annotation

GitHub Actions / Run linter

`type-fest` import should occur before import of `@/jslib/common/src/abstractions/i18n.service`

import { IDirectoryService } from "./directory.service";

Expand All @@ -31,6 +32,7 @@
}

async getEntries(force: boolean, test: boolean): Promise<[GroupEntry[], UserEntry[]]> {
const asdf = 1;

Check failure on line 35 in src/services/directory-services/gsuite-directory.service.ts

View workflow job for this annotation

GitHub Actions / Run linter

'asdf' is assigned a value but never used
const type = await this.stateService.getDirectoryType();
if (type !== DirectoryType.GSuite) {
return;
Expand Down
Loading