Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
PKief committed Jul 1, 2021
1 parent 6e56040 commit f06a8aa
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true
"singleQuote": true,
"endOfLine": "auto"
}
28 changes: 13 additions & 15 deletions src/commands/iconPacks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,20 @@ export const toggleIconPacks = async () => {
/** Show QuickPick items to select preferred configuration for the icon packs. */
const showQuickPickItems = (activePack: string) => {
const packs = [...getAllIconPacks().sort(), 'none'];
const options = packs.map(
(pack): vscode.QuickPickItem => {
const packLabel = helpers.toTitleCase(pack.replace('_', ' + '));
const active = isPackActive(activePack, pack);
const iconPacksDeactivated = pack === 'none' && activePack === '';
const options = packs.map((pack): vscode.QuickPickItem => {
const packLabel = helpers.toTitleCase(pack.replace('_', ' + '));
const active = isPackActive(activePack, pack);
const iconPacksDeactivated = pack === 'none' && activePack === '';

return {
description: packLabel,
detail: i18n.translate(
`iconPacks.${pack === 'none' ? 'disabled' : 'description'}`,
packLabel
),
label: iconPacksDeactivated ? '\u2714' : active ? '\u2714' : '\u25FB',
};
}
);
return {
description: packLabel,
detail: i18n.translate(
`iconPacks.${pack === 'none' ? 'disabled' : 'description'}`,
packLabel
),
label: iconPacksDeactivated ? '\u2714' : active ? '\u2714' : '\u25FB',
};
});

return vscode.window.showQuickPick(options, {
placeHolder: i18n.translate('iconPacks.selectPack'),
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const getObjectPropertyValue = (obj: Object, path: string) => {
.split('.'); // separate paths in array

/** Avoid errors in the getValue function. */
const isObject = (object: unknown) => {
const isObject = (object: unknown) => {
return object === Object(object);
};
let result = JSON.parse(JSON.stringify(obj));
Expand Down

0 comments on commit f06a8aa

Please sign in to comment.