Skip to content

Commit

Permalink
ci(lint): fix CI workflow not linting files (#898)
Browse files Browse the repository at this point in the history
* ci: run lint during CI workflow

* chore(format): run lint fix

* build(lint): stop running eslint on pre-commit

We lint on the CI anyway so no need to slowdown the commit process

* refactor(npm): remove echo in lint script
  • Loading branch information
gdostie authored and paulgerold committed Dec 19, 2024
1 parent 85a998e commit 9c7dfff
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 29 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
- name: Check merge commit
if: github.event_name == 'merge_group'
uses: ./.github/actions/merge-commit
- name: Statical analysis
uses: ./.github/actions/lint
- name: Tests
run: npm test
- name: Build
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@
"typescript-eslint": "8.4.0"
},
"lint-staged": {
"**/*.{ts,js}": [
"prettier --write",
"eslint . --fix"
],
"**/*.{md,json,yml}": [
"**/*.{ts,js,md,json,yml}": [
"prettier --write"
]
},
Expand Down
35 changes: 17 additions & 18 deletions src/resources/ApiKeys/ApiKeysInterfaces.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {GranularResource, PrivilegeModel} from '../BaseInterfaces.js';
import {ApiKeyStatus,ApiKeyExposureReportSeverity,ApiKeyReportCreationType} from '../Enums.js';
import {ApiKeyExposureReportSeverity, ApiKeyReportCreationType, ApiKeyStatus} from '../Enums.js';
import {UserModel} from '../Users/UserInterfaces.js';

export interface ApiKeyBaseModel extends GranularResource {
/**
Expand Down Expand Up @@ -191,29 +192,27 @@ interface ImpersonationRestrictionsModel {

interface ExposureReport {
/**
* API Key logger id associated to the Exposure Report
* API Key logger id associated to the Exposure Report
*/
apiKeyLoggerId: string,
apiKeyLoggerId: string;
/**
* The severity of the exposure
* The severity of the exposure
*/
severity: ApiKeyExposureReportSeverity,
severity: ApiKeyExposureReportSeverity;
/**
* The reason behind the exposure report for a given API key
* The reason behind the exposure report for a given API key
*/
reason: string,
reason: string;
/**
* The date the key should be deactivated
*/
deactivationDate: number,
/**
* The way the API key report has been created
*/
creationType: ApiKeyReportCreationType,
/**
* Represents the user that has created the report
*/
createdBy: any
deactivationDate: number;
/**
* The way the API key report has been created
*/
creationType: ApiKeyReportCreationType;
/**
* Represents the user that has created the report
*/
createdBy: UserModel;
}


9 changes: 4 additions & 5 deletions src/resources/Enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1176,19 +1176,18 @@ export enum ApiKeyStatus {
EXPIRED = 'EXPIRED',
SOON_TO_BE_EXPIRED = 'SOON_TO_BE_EXPIRED',
SOON_TO_BE_DISABLED = 'SOON_TO_BE_DISABLED',
DISABLED_EXPOSED = 'DISABLED_EXPOSED'
DISABLED_EXPOSED = 'DISABLED_EXPOSED',
}

export enum ApiKeyReportCreationType {
MANUAL = 'MANUAL',
AUTOMATED = 'AUTOMATED'
AUTOMATED = 'AUTOMATED',
}


export enum ApiKeyExposureReportSeverity {
CRITICAL = 'CRITICAL',
HIGH = 'HIGH',
MEDIUM = 'MEDIUM',
LOW = 'LOW',
WARN = 'WARN'
}
WARN = 'WARN',
}
2 changes: 1 addition & 1 deletion src/resources/License/LicenseInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export interface EntitlementModel {
/**
* Use case of the entitlement
*/
useCase: string;
useCase: string;
/**
* Limit of users for the entitlement
*/
Expand Down

0 comments on commit 9c7dfff

Please sign in to comment.