Skip to content

Commit

Permalink
chore: improvements on code quality
Browse files Browse the repository at this point in the history
  • Loading branch information
Sly777 committed Nov 22, 2023
1 parent 229368c commit 135c5bf
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/features/emmet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function getClassnamesAndIDs(html: string): {
if (classMatches) {
for (const match of classMatches) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unnecessary-type-assertion
const classes = match.replaceAll(classRegex, "$1").split(" ") as string[];
const classes = match.replaceAll(classRegex, "$1").split(" ");
classNames = [...classNames, ...classes];
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/features/emmet/questions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const qEmmetArea: ListQuestion<Answers> = {
when: (answers: IPluginOptions) => {
return (
answers.area == undefined ||
!answers.code?.includes(answers.componentContentTag || "")
!answers.code?.includes(answers.componentContentTag ?? "")
);
},
type: "list",
Expand Down
1 change: 0 additions & 1 deletion src/features/storybook/questions.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Question } from "inquirer";
// import { IPluginOptions } from "./interfaces";

export const questions: Question[] = [];
2 changes: 1 addition & 1 deletion src/internalFeatures/templatesLibrary/templatesLibrary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function addAdditionalHelpers() {
},
blockHelperMissing: function (context, options) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
return options.data.root[options.name] === undefined ? false : true;
return options.data.root[options.name] !== undefined;
},
});
}
Expand Down

0 comments on commit 135c5bf

Please sign in to comment.