Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(lint): fix CI workflow not linting files #898

Merged
merged 4 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
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
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"release": "semantic-release",
"commit-cli": "git-cz",
"lint:fix": "prettier --list-different --write \"**/*.{ts,js,json,md,yml}\" && eslint . --fix --quiet",
"lint": "prettier --check \"**/*.{ts,js,json,md,yml}\" && eslint .",
"lint": "prettier --check \"**/*.{ts,js,json,md,yml}\" && eslint . && echo 'Code looks good ✅'",
gdostie marked this conversation as resolved.
Show resolved Hide resolved
"prepare": "husky install"
},
"devDependencies": {
Expand All @@ -56,11 +56,7 @@
"typescript-eslint": "8.4.0"
},
"lint-staged": {
"**/*.{ts,js}": [
"prettier --write",
"eslint . --fix"
gdostie marked this conversation as resolved.
Show resolved Hide resolved
],
"**/*.{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
Loading