Skip to content

Commit

Permalink
chore: fix prettier changes
Browse files Browse the repository at this point in the history
  • Loading branch information
marcopixel committed Sep 4, 2023
1 parent 75d3f9d commit a473b7b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
const micromatch = require("micromatch")
const prettier = require("prettier")

// Figure out all extensions supported by Prettier.
const prettierSupportedExtensions = prettier
.getSupportInfo()
.languages.map(({ extensions }) => extensions)
.flat()

const addQuotes = (a) => `"${a}"`

module.exports = (allStagedFiles) => {
module.exports = async (allStagedFiles) => {
// Figure out all extensions supported by Prettier.
const prettierSupportedExtensions = await prettier
.getSupportInfo()
.languages.map(({ extensions }) => extensions)
.flat()

// Match files for ESLint
const eslintFiles = micromatch(allStagedFiles, ["**/*.{js,ts}"], {
dot: true,
Expand All @@ -25,7 +25,7 @@ module.exports = (allStagedFiles) => {
const prettierFiles = micromatch(
allStagedFiles,
prettierSupportedExtensions.map((extension) => `**/*${extension}`),
{ dot: true }
{ dot: true },
)

// Array of linters to be run in this sequence.
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-optimized-svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export async function buildOptimizedSVG(): Promise<void> {
// iterate counter + output to inform user
counter += 1
console.log(
`${counter}/${Object.keys(ops).length} - ${path.normalize(`${TEMP_DIR}/svg/${op}.svg`)}`
`${counter}/${Object.keys(ops).length} - ${path.normalize(`${TEMP_DIR}/svg/${op}.svg`)}`,
)

// optimize svg with svgo
Expand Down
2 changes: 1 addition & 1 deletion src/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function attributesToString(attributes: Record<string, unknown>): string {
*/
export function getSVGIcon(
op: Operator,
userAttributes?: { [key: string]: unknown }
userAttributes?: { [key: string]: unknown },
): string | Error {
// check if parameter is an object
if (userAttributes && typeof userAttributes !== "object") {
Expand Down

0 comments on commit a473b7b

Please sign in to comment.