Skip to content

Commit f093ff9

Browse files
authored
chore: drop eslint-plugin-markdown dep (#550)
related #477
1 parent 6615813 commit f093ff9

26 files changed

+4946
-4566
lines changed

.changeset/serious-pigs-scream.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"eslint-mdx": minor
3+
"eslint-plugin-mdx": minor
4+
---
5+
6+
chore: drop `eslint-plugin-markdown` dep

.codesandbox/ci.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
2-
"node": "18",
3-
"installCommand": "codesandbox:install",
2+
"node": "20",
43
"packages": [
54
"packages/*"
65
],

.github/workflows/ci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
- push
55
- pull_request
66

7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
711
jobs:
812
ci:
913
name: Lint and Test with Node.js ${{ matrix.node }} on ${{ matrix.os }}
@@ -16,6 +20,7 @@ jobs:
1620
node:
1721
- 18
1822
- 20
23+
fail-fast: false
1924
runs-on: ${{ matrix.os }}
2025
steps:
2126
- name: Checkout Repo

.github/workflows/pkg-size.yml

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches:
66
- master
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
812
jobs:
913
pkg-size-report:
1014
name: Package Size Report

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.yarn
2+
test/fixtures

.yarn/releases/yarn-4.7.0.cjs

+935
Large diffs are not rendered by default.

.yarnrc.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ plugins:
44
- checksum: 37b2361b1502b2054e6779788c0e9bdd6a90ce49852a8cad2feda79b0614ec94f06fb6e78951f5f95429c610d7934dd077caa47413a0227378a102c55161616d
55
path: .yarn/plugins/plugin-prepare-lifecycle.cjs
66
spec: "https://github.com/un-es/yarn-plugin-prepare-lifecycle/releases/download/v0.0.1/index.js"
7+
8+
yarnPath: .yarn/releases/yarn-4.7.0.cjs

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ See [#251](https://github.com/mdx-js/eslint-mdx/issues/251#issuecomment-73613922
9292
"mdx/code-blocks": true,
9393
// optional, if you want to disable language mapper, set it to `false`
9494
// if you want to override the default language mapper inside, you can provide your own
95-
"mdx/language-mapper": {}
96-
}
95+
"mdx/language-mapper": {},
96+
},
9797
}
9898
```
9999

@@ -214,9 +214,9 @@ If you want to disable or change severity of some related rules, it won't work b
214214
// disable following plugin
215215
[
216216
"lint-no-multiple-toplevel-headings",
217-
[0] // or false
218-
]
219-
]
217+
[0], // or false
218+
],
219+
],
220220
}
221221
```
222222

package.json

+26-26
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@
99
"workspaces": [
1010
"packages/*"
1111
],
12-
"packageManager": "yarn@4.0.2",
12+
"packageManager": "yarn@4.7.0",
1313
"scripts": {
1414
"build": "concurrently -r 'yarn:build:*'",
1515
"build:r": "r -f es2015",
1616
"build:ts": "tsc -b",
1717
"clean": "rimraf --glob 'packages/*/{lib,*.tsbuildinfo}'",
18-
"codesandbox:install": "yarn --ignore-engines",
1918
"lint": "yarn build && concurrently -r 'yarn:lint:*'",
2019
"lint:es": "eslint . --cache -f friendly",
2120
"lint:tsc": "tsc --noEmit",
@@ -24,49 +23,50 @@
2423
"release:only": "changeset publish",
2524
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
2625
"typecov": "type-coverage",
27-
"version": "changeset version && yarn --no-immutable"
26+
"version": "changeset version && yarn --no-immutable",
27+
"prettier": "prettier --log-level silent"
2828
},
2929
"devDependencies": {
3030
"@1stg/common-config": "^10.0.0",
31-
"@changesets/changelog-github": "^0.5.0",
32-
"@changesets/cli": "^2.27.1",
33-
"@commitlint/cli": "^18.4.4",
31+
"@changesets/changelog-github": "^0.5.1",
32+
"@changesets/cli": "^2.28.1",
33+
"@commitlint/cli": "^18.6.1",
3434
"@pkgr/rollup": "^5.0.0",
35-
"@types/acorn": "^6.0.0",
36-
"@types/eslint": "^8.56.1",
37-
"@types/eslint-plugin-markdown": "^2.0.2",
38-
"@types/jest": "^29.5.11",
39-
"@types/node": "^20.10.6",
40-
"@types/react": "^18.2.46",
41-
"@types/unist": "^3.0.2",
35+
"@types/acorn": "^6.0.4",
36+
"@types/eslint": "^8.56.12",
37+
"@types/jest": "^29.5.14",
38+
"@types/node": "^20.17.24",
39+
"@types/react": "^18.3.18",
40+
"@types/unist": "^3.0.3",
41+
"@unts/patch-package": "^8.1.1",
4242
"concurrently": "^8.2.2",
4343
"cross-env": "^7.0.3",
44-
"eslint": "^8.56.0",
45-
"jest": "^30.0.0-alpha.2",
46-
"lint-staged": "^15.2.0",
47-
"patch-package": "^8.0.0",
48-
"prettier": "^3.1.1",
49-
"react": "^18.2.0",
50-
"rimraf": "^5.0.5",
51-
"simple-git-hooks": "^2.9.0",
52-
"ts-jest": "^29.1.1",
44+
"eslint": "^8.57.1",
45+
"jest": "^30.0.0-alpha.7",
46+
"lint-staged": "^15.4.3",
47+
"prettier": "^3.5.3",
48+
"react": "^18.3.1",
49+
"rimraf": "^5.0.10",
50+
"simple-git-hooks": "^2.11.1",
51+
"ts-jest": "^29.2.6",
5352
"ts-node": "^10.9.2",
54-
"type-coverage": "^2.27.1",
55-
"typescript": "^5.3.3"
53+
"type-coverage": "^2.29.7",
54+
"typescript": "~5.3.3"
5655
},
5756
"resolutions": {
5857
"@types/acorn": "^6.0.0",
5958
"@types/mdast": "^4.0.3",
59+
"@pkgr/utils": "^3.0.0",
6060
"acorn": "^8.11.3",
6161
"cliui": "npm:@isaacs/cliui@^8.0.2",
6262
"eslint-mdx": "link:packages/eslint-mdx",
63-
"eslint-plugin-markdown": "JounQin/eslint-plugin-markdown#feat/bump",
6463
"eslint-plugin-mdx": "link:packages/eslint-plugin-mdx",
6564
"mdast-util-frontmatter": "^2.0.1",
6665
"mdast-util-gfm": "^3.0.0",
6766
"unified": "^11.0.4",
6867
"unified-engine": "^11.2.0",
69-
"unist-util-visit": "^5.0.0"
68+
"unist-util-visit": "^5.0.0",
69+
"prettier": "^3.5.3"
7070
},
7171
"commitlint": {
7272
"extends": [

packages/eslint-mdx/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ See [#251](https://github.com/mdx-js/eslint-mdx/issues/251#issuecomment-73613922
9292
"mdx/code-blocks": true,
9393
// optional, if you want to disable language mapper, set it to `false`
9494
// if you want to override the default language mapper inside, you can provide your own
95-
"mdx/language-mapper": {}
96-
}
95+
"mdx/language-mapper": {},
96+
},
9797
}
9898
```
9999

@@ -214,9 +214,9 @@ If you want to disable or change severity of some related rules, it won't work b
214214
// disable following plugin
215215
[
216216
"lint-no-multiple-toplevel-headings",
217-
[0] // or false
218-
]
219-
]
217+
[0], // or false
218+
],
219+
],
220220
}
221221
```
222222

packages/eslint-mdx/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,19 @@
3030
"eslint": ">=8.0.0"
3131
},
3232
"dependencies": {
33-
"acorn": "^8.11.3",
33+
"acorn": "^8.14.1",
3434
"acorn-jsx": "^5.3.2",
3535
"espree": "^9.6.1",
3636
"estree-util-visit": "^2.0.0",
37-
"remark-mdx": "^3.0.0",
37+
"remark-mdx": "^3.1.0",
3838
"remark-parse": "^11.0.0",
3939
"remark-stringify": "^11.0.0",
40-
"synckit": "^0.9.0",
41-
"tslib": "^2.6.2",
42-
"unified": "^11.0.4",
43-
"unified-engine": "^11.2.0",
40+
"synckit": "^0.9.2",
41+
"tslib": "^2.8.1",
42+
"unified": "^11.0.5",
43+
"unified-engine": "^11.2.2",
4444
"unist-util-visit": "^5.0.0",
4545
"uvu": "^0.5.6",
46-
"vfile": "^6.0.1"
46+
"vfile": "^6.0.3"
4747
}
4848
}

packages/eslint-mdx/src/helpers.ts

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export const getPhysicalFilename = (
3535
const { code } = err as { code: string }
3636
// https://github.com/eslint/eslint/issues/11989
3737
// Additionally, it seems there is no `ENOTDIR` code on Windows...
38+
// istanbul ignore if
3839
if (code === 'ENOTDIR' || code === 'ENOENT') {
3940
return getPhysicalFilename(path.dirname(filename), filename)
4041
}

packages/eslint-plugin-mdx/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ See [#251](https://github.com/mdx-js/eslint-mdx/issues/251#issuecomment-73613922
9292
"mdx/code-blocks": true,
9393
// optional, if you want to disable language mapper, set it to `false`
9494
// if you want to override the default language mapper inside, you can provide your own
95-
"mdx/language-mapper": {}
96-
}
95+
"mdx/language-mapper": {},
96+
},
9797
}
9898
```
9999

@@ -214,9 +214,9 @@ If you want to disable or change severity of some related rules, it won't work b
214214
// disable following plugin
215215
[
216216
"lint-no-multiple-toplevel-headings",
217-
[0] // or false
218-
]
219-
]
217+
[0], // or false
218+
],
219+
],
220220
}
221221
```
222222

packages/eslint-plugin-mdx/package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@
3232
},
3333
"dependencies": {
3434
"eslint-mdx": "^3.1.5",
35-
"eslint-plugin-markdown": "^3.0.1",
36-
"remark-mdx": "^3.0.0",
35+
"mdast-util-from-markdown": "^2.0.2",
36+
"remark-mdx": "^3.1.0",
3737
"remark-parse": "^11.0.0",
3838
"remark-stringify": "^11.0.0",
39-
"tslib": "^2.6.2",
40-
"unified": "^11.0.4",
41-
"vfile": "^6.0.1"
39+
"synckit": "^0.9.2",
40+
"tslib": "^2.8.1",
41+
"unified": "^11.0.5",
42+
"vfile": "^6.0.3"
4243
}
4344
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import type { fromMarkdown as fromMarkdown_ } from 'mdast-util-from-markdown'
2+
import { createSyncFn } from 'synckit'
3+
4+
export const fromMarkdown = createSyncFn(
5+
require.resolve('./worker'),
6+
) as typeof fromMarkdown_

0 commit comments

Comments
 (0)