Skip to content

Commit a473b7b

Browse files
committed
chore: fix prettier changes
1 parent 75d3f9d commit a473b7b

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

lint-staged.config.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
const micromatch = require("micromatch")
88
const prettier = require("prettier")
99

10-
// Figure out all extensions supported by Prettier.
11-
const prettierSupportedExtensions = prettier
12-
.getSupportInfo()
13-
.languages.map(({ extensions }) => extensions)
14-
.flat()
15-
1610
const addQuotes = (a) => `"${a}"`
1711

18-
module.exports = (allStagedFiles) => {
12+
module.exports = async (allStagedFiles) => {
13+
// Figure out all extensions supported by Prettier.
14+
const prettierSupportedExtensions = await prettier
15+
.getSupportInfo()
16+
.languages.map(({ extensions }) => extensions)
17+
.flat()
18+
1919
// Match files for ESLint
2020
const eslintFiles = micromatch(allStagedFiles, ["**/*.{js,ts}"], {
2121
dot: true,
@@ -25,7 +25,7 @@ module.exports = (allStagedFiles) => {
2525
const prettierFiles = micromatch(
2626
allStagedFiles,
2727
prettierSupportedExtensions.map((extension) => `**/*${extension}`),
28-
{ dot: true }
28+
{ dot: true },
2929
)
3030

3131
// Array of linters to be run in this sequence.

scripts/build-optimized-svg.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export async function buildOptimizedSVG(): Promise<void> {
2222
// iterate counter + output to inform user
2323
counter += 1
2424
console.log(
25-
`${counter}/${Object.keys(ops).length} - ${path.normalize(`${TEMP_DIR}/svg/${op}.svg`)}`
25+
`${counter}/${Object.keys(ops).length} - ${path.normalize(`${TEMP_DIR}/svg/${op}.svg`)}`,
2626
)
2727

2828
// optimize svg with svgo

src/functions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function attributesToString(attributes: Record<string, unknown>): string {
1818
*/
1919
export function getSVGIcon(
2020
op: Operator,
21-
userAttributes?: { [key: string]: unknown }
21+
userAttributes?: { [key: string]: unknown },
2222
): string | Error {
2323
// check if parameter is an object
2424
if (userAttributes && typeof userAttributes !== "object") {

0 commit comments

Comments
 (0)