Skip to content

Commit

Permalink
refactor: fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nix6839 committed Apr 8, 2024
1 parent 292e87a commit fb6d331
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion apps/portfolio/src/components/pages/index/About.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ interface Props {
const { class: className } = Astro.props;
interface Contact {
icon: (_props: IconProps) => any;
icon: (_props: IconProps) => unknown;
name: string;
href: string;
}
// Why disable: https://github.com/ota-meshi/eslint-plugin-astro/issues/348
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
const contacts: Contact[] = [
{
icon: GitHubIcon,
Expand All @@ -34,6 +36,7 @@ const contacts: Contact[] = [
// href: 'https://blog.yeongwoo.dev',
// },
];
/* eslint-enable @typescript-eslint/no-unsafe-assignment */
---

<section class={className}>
Expand Down
1 change: 1 addition & 0 deletions packages/fetch-pretendard/src/lib/download-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as fs from 'node:fs/promises';
* @param {string} outputPath
*/
export default async function downloadFile(fileUrl, outputPath) {
/** @type {import('axios').AxiosResponse<import('node:stream').Stream>} */
const response = await axios.get(fileUrl, {
responseType: 'stream',
});
Expand Down
4 changes: 3 additions & 1 deletion packages/fetch-pretendard/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ try {
async function main() {
const { cssUrl, fontOutputDir, cssOutputPath } = parseArgs();

const css = /** @type {string} */ ((await axios.get(cssUrl)).data);
const css = /** @type {import('axios').AxiosResponse<string>} */ (
await axios.get(cssUrl)
).data;

if (!isValidCSS(css)) {
throw new Error(`"${cssUrl}" is a invalid CSS.`);
Expand Down

0 comments on commit fb6d331

Please sign in to comment.