Skip to content

Commit

Permalink
chore: bump version & add eslint-mdx back
Browse files Browse the repository at this point in the history
  • Loading branch information
tianyingchun committed Aug 9, 2024
1 parent cc35816 commit 00f439b
Show file tree
Hide file tree
Showing 6 changed files with 1,345 additions and 319 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-nails-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hyperse/eslint-config-hyperse": patch
---

bump add eslint-mdx back
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ You can add two scripts to your package.json to lint and/or fix your code:
You can also add additional rules for Next.js

```ts
import { defineConfig,nextjs } from '@hyperse/eslint-config-hyperse';
import { defineConfig, nextjs } from '@hyperse/eslint-config-hyperse';

export default defineConfig([
// ...typescript
Expand Down Expand Up @@ -189,7 +189,7 @@ Once you have done. You probably want your editor to lint and fix for you.
we need to disable vscode editor language formatter for `json, jsonc`

```json
{
{
"[jsonc]": {
"editor.formatOnSave": false
},
Expand Down
11 changes: 4 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-define-config": "^2.1.0",
"eslint-plugin-jsonc": "^2.16.0",
"eslint-plugin-markdown": "^5.1.0",
"eslint-plugin-mdx": "^3.1.5",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "beta",
Expand All @@ -86,13 +86,13 @@
"get-tsconfig": "^4.7.6",
"globals": "^15.9.0",
"prettier": "^3.3.3",
"tailwindcss": "^3.4.7",
"tailwindcss": "^3.4.9",
"typescript-eslint": "^8.0.1"
},
"devDependencies": {
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.7",
"@commitlint/cli": "19.3.0",
"@commitlint/cli": "19.4.0",
"@commitlint/config-conventional": "19.2.2",
"@swc/core": "^1.7.6",
"@types/eslint__js": "^8.42.3",
Expand All @@ -103,13 +103,10 @@
"eslint": "^9.8.0",
"husky": "9.1.4",
"lint-staged": "15.2.8",
"npm-run-all": "4.1.5",
"rimraf": "6.0.1",
"swc-unplugin-ts": "1.0.3",
"tsup": "^8.2.4",
"tsx": "^4.16.5",
"tsx": "^4.17.0",
"typescript": "5.5.4",
"vite-tsconfig-paths": "4.3.2",
"vitest": "2.0.5"
},
"peerDependencies": {
Expand Down
15 changes: 13 additions & 2 deletions src/rules/mdx.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
import { defineFlatConfig } from 'eslint-define-config';
import pluginMdx from 'eslint-plugin-markdown';
import pluginMdx from 'eslint-plugin-mdx';

export const mdx = defineFlatConfig([...pluginMdx.configs.recommended]);
export const mdx = defineFlatConfig([
{
...(pluginMdx.flat as any),
// optional, if you want to lint code blocks at the same
processor: pluginMdx.createRemarkProcessor({
lintCodeBlocks: true,
// optional, if you want to disable language mapper, set it to `false`
// if you want to override the default language mapper inside, you can provide your own
languageMapper: {},
}),
},
]);
2 changes: 1 addition & 1 deletion src/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
declare module 'eslint-plugin-tailwindcss';
declare module 'eslint-plugin-react-hooks';
declare module 'eslint-plugin-react';
declare module '@next/eslint-plugin-next';
declare module 'eslint-plugin-markdown';
declare module '@next/eslint-plugin-next';
Loading

0 comments on commit 00f439b

Please sign in to comment.