Skip to content

Commit

Permalink
fix(lint error): fix bug in lint files
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathancaleb committed Sep 24, 2024
1 parent a22ecfa commit 8ba1688
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Binary file modified bun.lockb
Binary file not shown.
6 changes: 3 additions & 3 deletions eslint.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ declare module '@eslint/eslintrc' {
resolvePluginsRelativeTo: string;
});

extends(extendsValue: string): Linter.FlatConfig & {
[Symbol.iterator]: () => IterableIterator<Linter.FlatConfig>;
extends(extendsValue: string): Linter.Config & {
[Symbol.iterator]: () => IterableIterator<Linter.Config>;
};
}
}
Expand All @@ -44,7 +44,7 @@ declare module '@eslint/compat' {
import type { ConfigWithExtends } from 'typescript-eslint';

export const fixupConfigRules: (
config: string | Linter.FlatConfig,
config: string | Linter.Config,
) => ConfigWithExtends[];
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"prettier-plugin-packagejson": "^2.5.2",
"tailwindcss": "^3.4.12",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.6.2",
"typescript": "^5.6.0",
"typescript-eslint": "^8.6.0"
},
"trustedDependencies": [
Expand Down
2 changes: 2 additions & 0 deletions src/lib/mdx.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import fs from 'node:fs/promises';
import path from 'path';

// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
function parseFrontmatter<T extends Record<string, unknown>>(
fileContent: string,
) {
Expand All @@ -27,6 +28,7 @@ function parseFrontmatter<T extends Record<string, unknown>>(
return { metadata: metadata as T, content };
}

// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
async function getMDXData<T extends Record<string, unknown>>(dir: string) {
const files = await fs.readdir(dir);
const mdxFiles = files.filter(
Expand Down

0 comments on commit 8ba1688

Please sign in to comment.