Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowans committed May 24, 2024
1 parent 25f7d99 commit 06eb561
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion data/config.example.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import type * as configTypes from '../types/configTypes';
import type * as configTypes from '../types/configTypes.js';
export declare const config: configTypes.Config;
2 changes: 1 addition & 1 deletion data/config.example.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type * as configTypes from '../types/configTypes'
import type * as configTypes from '../types/configTypes.js'

export const config: configTypes.Config = {
application: {
Expand Down
2 changes: 1 addition & 1 deletion data/config.testing.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import type * as configTypes from '../types/configTypes';
import type * as configTypes from '../types/configTypes.js';
export declare const config: configTypes.Config;
2 changes: 1 addition & 1 deletion data/config.testing.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type * as configTypes from '../types/configTypes'
import type * as configTypes from '../types/configTypes.js'

export const config: configTypes.Config = {
application: {
Expand Down
2 changes: 1 addition & 1 deletion data/customReportsSsm.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import type { ReportDefinition } from '../types/configTypes';
import type { ReportDefinition } from '../types/configTypes.js';
export declare const customReports_general: ReportDefinition[];
2 changes: 1 addition & 1 deletion data/customReportsSsm.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ReportDefinition } from '../types/configTypes'
import type { ReportDefinition } from '../types/configTypes.js'

// eslint-disable-next-line @typescript-eslint/naming-convention
export const customReports_general: ReportDefinition[] = [
Expand Down
2 changes: 1 addition & 1 deletion data/licenceLengthFunctions.d.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
import type { LicenceLengthFunction } from '../types/configTypes';
import type { LicenceLengthFunction } from '../types/configTypes.js';
export declare const endOfMarchNextYear: LicenceLengthFunction;
2 changes: 1 addition & 1 deletion data/licenceLengthFunctions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { LicenceLengthFunction } from '../types/configTypes'
import type { LicenceLengthFunction } from '../types/configTypes.js'

const endOfMonthNextYear = (
startDate: Date,
Expand Down
2 changes: 1 addition & 1 deletion database/createLicence.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function createLicence(licenceForm, sessionUser) {
const licenceApprovalKeys = licenceForm.licenceApprovalKeys.split(',');
saveLicenceApprovals(licenceId, licenceApprovalKeys, licenceForm, database);
}
for (const licenceCategoryAdditionalFee of licenceCategory.licenceCategoryAdditionalFees) {
for (const licenceCategoryAdditionalFee of licenceCategory.licenceCategoryAdditionalFees ?? []) {
if (!licenceCategoryAdditionalFee.isRequired) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion database/createLicence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default function createLicence(
saveLicenceApprovals(licenceId, licenceApprovalKeys, licenceForm, database)
}

for (const licenceCategoryAdditionalFee of licenceCategory.licenceCategoryAdditionalFees) {
for (const licenceCategoryAdditionalFee of licenceCategory.licenceCategoryAdditionalFees ?? []) {
if (!licenceCategoryAdditionalFee.isRequired) {
continue
}
Expand Down
2 changes: 1 addition & 1 deletion database/getReportData.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function getLicencesByLicenceCategorySQL(licenceCategoryKey) {
sqlParameters
};
}
export default function getReportData(reportName, reportParameters) {
export default function getReportData(reportName, reportParameters = {}) {
let sql;
let sqlParameters = [];
const customReport = getCustomReport(reportName);
Expand Down
2 changes: 1 addition & 1 deletion database/getReportData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ function getLicencesByLicenceCategorySQL(licenceCategoryKey: string): {

export default function getReportData(
reportName: string,
reportParameters?: ReportParameters
reportParameters: ReportParameters = {}
): unknown[] | undefined {
let sql: string
let sqlParameters: Array<string | number> = []
Expand Down
1 change: 1 addition & 0 deletions public/javascripts/licence-licenceCategorySummary.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable unicorn/filename-case, unicorn/prefer-module */

import type { cityssmGlobal } from '@cityssm/bulma-webapp-js/src/types'

import type * as recordTypes from '../../types/recordTypes.js'

declare const cityssm: cityssmGlobal
Expand Down

0 comments on commit 06eb561

Please sign in to comment.