Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ultram4rine committed Aug 11, 2024
1 parent a9a6460 commit f958c30
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { LicenseItem, License } from "../types";
* Uncommon licenses.
* They not seen at `/licenses`, but accessible at `/licenses/<key>`.
*/
/* eslint-disable @typescript-eslint/naming-convention */
export const uncommonLicenses: LicenseItem[] = [
{
key: "bsd-4-clause",
Expand Down Expand Up @@ -89,7 +88,6 @@ const licenseToQuickPickItem = (
key: l.key,
};
};
/* eslint-enable @typescript-eslint/naming-convention */

const showLicenses = async (
options?: vscode.QuickPickOptions
Expand Down Expand Up @@ -287,7 +285,7 @@ const addLicense = async (license: License, multiple: boolean) => {
};

const chooseFolder = async () => {
let folders = vscode.workspace.workspaceFolders;
const folders = vscode.workspace.workspaceFolders;
if (folders) {
let folder: vscode.WorkspaceFolder | undefined;
if (folders.length === 1) {
Expand Down
2 changes: 0 additions & 2 deletions src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/naming-convention */

type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;

export type LicenseItem = Optional<
Expand Down
3 changes: 2 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ export const replaceYear = (year: string, key: string, text: string) => {
text = text.replace(/\[year]/g, year);
break;

case "wtfpl":
case "wtfpl": {
// Replace second occurrence.
let t = 0;
text = text.replace(/2004/g, (match) => (++t === 2 ? year : match));
break;
}

case "bsl-1.0":
case "cc0-1.0":
Expand Down

0 comments on commit f958c30

Please sign in to comment.