Skip to content

Commit

Permalink
chore: add lint for missing return types
Browse files Browse the repository at this point in the history
  • Loading branch information
fcasal committed Oct 3, 2024
1 parent 48bb0f8 commit 81cc983
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
],
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"@typescript-eslint/explicit-function-return-type": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
Expand Down
4 changes: 2 additions & 2 deletions src/codeMarker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ class WARoot {
* @param auditRemote The audit remote to be configured.
* @param gitSha The git SHA digest to be configured.
*/
updateGitConfig(clientRemote: string, auditRemote: string, gitSha: string) {
updateGitConfig(clientRemote: string, auditRemote: string, gitSha: string): void {
this.clientRemote = clientRemote;
this.gitRemote = auditRemote;
this.gitSha = gitSha;
Expand Down Expand Up @@ -1059,7 +1059,7 @@ class MultiRootManager {
this.roots.map((root) => ({ rootPath: root.rootPath, rootLabel: root.getRootLabel() }) as RootPathAndLabel),
);
// Add a listener for changes to the roots
const listener = async (event: vscode.WorkspaceFoldersChangeEvent) => {
const listener = async (event: vscode.WorkspaceFoldersChangeEvent): Promise<void> => {
// Any removed or added roots will execute weAudit.toggleSavedFindings, which will cause a refresh
// of the tree, and hence a recreation of the pathToEntryMap (which is important in case there is
// only one workspace root left)
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export interface EntryDetails {
* Creates a default entry details object.
* @returns the default entry details object
*/
export function createDefaultEntryDetails() {
export function createDefaultEntryDetails(): EntryDetails {
return {
severity: FindingSeverity.Undefined,
difficulty: FindingDifficulty.Undefined,
Expand Down Expand Up @@ -376,7 +376,7 @@ export function getEntryIndexFromArray(entry: Entry, array: Entry[]): number {
return -1;
}

export function mergeTwoEntryArrays(a: Entry[], b: Entry[]) {
export function mergeTwoEntryArrays(a: Entry[], b: Entry[]): Entry[] {
// merge two arrays of entries
// without duplicates
const result: Entry[] = a;
Expand Down

0 comments on commit 81cc983

Please sign in to comment.