Skip to content

Commit 07e2b36

Browse files
committed
Update dev-dependencies
1 parent 8a56312 commit 07e2b36

File tree

22 files changed

+5088
-4263
lines changed

22 files changed

+5088
-4263
lines changed

docs/_asset/index.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,8 @@ button.success {
716716
margin-block: calc(2 * (1em + 1ex));
717717
overflow: hidden;
718718
/* yellow */
719-
background-image: radial-gradient(
719+
background-image:
720+
radial-gradient(
720721
ellipse at 0% 0%,
721722
rgb(252 180 45 / 5%) 20%,
722723
rgb(252 180 45 / 0%) 80%
@@ -1056,7 +1057,8 @@ button.success {
10561057

10571058
.card {
10581059
/* yellow */
1059-
background-image: radial-gradient(
1060+
background-image:
1061+
radial-gradient(
10601062
ellipse at 0% 0%,
10611063
rgb(252 180 45 / 10%) 20%,
10621064
rgb(252 180 45 / 0%) 80%

package-lock.json

Lines changed: 4912 additions & 4154 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,13 @@
4040
"chrome-aws-lambda": "^10.1.0",
4141
"codemirror": "^6.0.0",
4242
"cross-env": "^7.0.0",
43-
"cssnano": "^5.0.0",
43+
"cssnano": "^6.0.0",
4444
"dlv": "^1.0.0",
45-
"esbuild": "^0.17.0",
45+
"esbuild": "^0.19.0",
4646
"eslint-config-xo-react": "^0.27.0",
4747
"eslint-plugin-es": "^4.0.0",
4848
"eslint-plugin-react": "^7.0.0",
4949
"eslint-plugin-react-hooks": "^4.0.0",
50-
"eslint-plugin-security": "^1.0.0",
5150
"estree-util-value-to-estree": "^2.0.0",
5251
"estree-util-visit": "^1.0.0",
5352
"globby": "^13.0.0",
@@ -57,15 +56,15 @@
5756
"hastscript": "^7.0.0",
5857
"highlight.js": "^11.0.0",
5958
"husky": "^8.0.0",
60-
"lint-staged": "^13.0.0",
59+
"lint-staged": "^14.0.0",
6160
"lowlight": "^2.0.0",
6261
"p-all": "^4.0.0",
63-
"patch-package": "^6.0.0",
62+
"patch-package": "^8.0.0",
6463
"periscopic": "^3.0.0",
6564
"postcss": "^8.0.0",
6665
"postcss-cli": "^10.0.0",
67-
"prettier": "^2.0.0",
68-
"puppeteer-core": "^19.0.0",
66+
"prettier": "^3.0.0",
67+
"puppeteer-core": "^21.0.0",
6968
"react": "0.0.0-experimental-1159ff619-20220324",
7069
"react-dom": "0.0.0-experimental-1159ff619-20220324",
7170
"react-error-boundary": "^3.0.0",
@@ -115,7 +114,7 @@
115114
"xast-util-feed": "^1.0.0",
116115
"xast-util-sitemap": "^1.0.0",
117116
"xast-util-to-xml": "^3.0.0",
118-
"xo": "^0.54.0"
117+
"xo": "^0.56.0"
119118
},
120119
"scripts": {
121120
"postinstall": "patch-package",
@@ -130,8 +129,8 @@
130129
"docs-prod": "npm run docs-prep && npm run docs-bundle-prod && npm run docs-generate && npm run docs-prerender && npm run docs-post",
131130
"docs": "npm run docs-prod",
132131
"docs-deploy": "vercel && vercel alias $(pbpaste) mdxjs.com && vercel alias $(pbpaste) www.mdxjs.com",
133-
"format": "remark . -qfo && remark . -e mdx -u mdx -qfo && prettier . -w --loglevel warn && xo --fix",
134-
"lint": "remark . -qf && remark . -e mdx -u mdx -qf && prettier . -c --loglevel warn && xo",
132+
"format": "remark . -qfo && remark . -e mdx -u mdx -qfo && prettier . -w --log-level warn && xo --fix",
133+
"lint": "remark . -qf && remark . -e mdx -u mdx -qf && prettier . -c --log-level warn && xo",
135134
"build": "npm run build --workspaces --if-present",
136135
"test-api": "npm run test-api --workspaces --if-present",
137136
"test-coverage": "npm run test-coverage --workspaces --if-present",
@@ -165,23 +164,16 @@
165164
"envs": [
166165
"shared-node-browser"
167166
],
168-
"extensions": [
169-
"jsx",
170-
"cjs"
171-
],
172167
"prettier": true,
173168
"rules": {
174-
"import/extensions": "off",
175169
"n/file-extension-in-import": "off",
176170
"react/prop-types": "off",
177171
"unicorn/no-await-expression-member": "off",
178-
"unicorn/prefer-code-point": "off",
172+
"unicorn/prefer-at": "off",
179173
"unicorn/prefer-logical-operator-over-ternary": "off",
180174
"unicorn/prefer-node-protocol": "off",
181175
"unicorn/prefer-top-level-await": "off",
182-
"capitalized-comments": "off",
183-
"complexity": "off",
184-
"max-depth": "off"
176+
"complexity": "off"
185177
},
186178
"overrides": [
187179
{
@@ -194,35 +186,9 @@
194186
},
195187
{
196188
"files": [
197-
"docs/**/*.js",
198-
"packages/{mdx,react,preact}/test/**/*.{js,jsx}",
199-
"website/**/*.js"
189+
"docs/**/*.js"
200190
],
201191
"extends": "xo-react"
202-
},
203-
{
204-
"files": [
205-
"packages/*/lib/**/*.js",
206-
"packages/remark-mdx/index.js"
207-
],
208-
"extends": [
209-
"plugin:es/restrict-to-es2019",
210-
"plugin:security/recommended"
211-
],
212-
"rules": {
213-
"security/detect-object-injection": "off"
214-
}
215-
},
216-
{
217-
"files": [
218-
"**/*.d.ts"
219-
],
220-
"rules": {
221-
"@typescript-eslint/consistent-indexed-object-style": [
222-
"error",
223-
"index-signature"
224-
]
225-
}
226192
}
227193
]
228194
},

packages/esbuild/lib/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export function esbuild(options) {
5050
*/
5151
function setup(build) {
5252
const filter = extnamesToRegex(extnames)
53-
/* eslint-disable-next-line security/detect-non-literal-regexp */
5453
const filterHttp = new RegExp('^https?:\\/{2}.+' + filter.source)
5554
const http = /^https?:\/{2}/
5655
const filterHttpOrRelative = /^(https?:\/{2}|.{1,2}\/).*/
@@ -133,8 +132,7 @@ export function esbuild(options) {
133132
data.pluginData.contents !== null &&
134133
data.pluginData.contents !== undefined
135134
? data.pluginData.contents
136-
: /* eslint-disable-next-line security/detect-non-literal-fs-filename */
137-
await fs.readFile(data.path)
135+
: await fs.readFile(data.path)
138136
)
139137

140138
let file = new VFile({value: doc, path: data.path})

packages/esbuild/package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"@types/react": "^18.0.0",
5050
"@types/react-dom": "^18.0.0",
5151
"@types/unist": "^2.0.0",
52-
"esbuild": "^0.17.0",
52+
"esbuild": "^0.19.0",
5353
"react": "^18.0.0",
5454
"react-dom": "^18.0.0",
5555
"vfile-message": "^3.0.0"
@@ -61,7 +61,15 @@
6161
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
6262
"test": "npm run build && npm run test-coverage"
6363
},
64-
"xo": false,
64+
"xo": {
65+
"prettier": true,
66+
"rules": {
67+
"complexity": "off",
68+
"n/file-extension-in-import": "off",
69+
"unicorn/no-await-expression-member": "off",
70+
"unicorn/prefer-node-protocol": "off"
71+
}
72+
},
6573
"typeCoverage": {
6674
"atLeast": 100,
6775
"detail": true,

packages/loader/index.d.cts

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1-
// Some TS versions use this file, some `index.d.ts`.
2-
type LoaderContext = import('webpack').LoaderContext<unknown>
1+
// Some TS versions use this file, some `index.d.cts`.
2+
import type {ProcessorOptions} from '@mdx-js/mdx/lib/core.js'
3+
import type {LoaderContext} from 'webpack'
34

4-
declare function mdxLoader(this: LoaderContext, code: string): void
5-
export = mdxLoader
5+
/**
6+
* A Webpack loader to compile MDX to JavaScript.
7+
*
8+
* [Reference for Loader API](https://webpack.js.org/api/loaders/)
9+
*
10+
* @this {LoaderContext<unknown>}
11+
* @param {string} value
12+
* The original module source code.
13+
* @returns {void}
14+
*/
15+
declare function mdxLoader(this: LoaderContext<unknown>, value: string): void
616

7-
export type Options = import('@mdx-js/mdx/lib/core.js').ProcessorOptions
17+
export default mdxLoader
18+
19+
export type Options = ProcessorOptions

packages/loader/index.d.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

packages/loader/package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"@vue/server-renderer": "^3.0.0",
5959
"babel-loader": "^9.0.0",
6060
"preact": "^10.0.0",
61-
"preact-render-to-string": "^5.0.0",
61+
"preact-render-to-string": "^6.0.0",
6262
"react": "^18.0.0",
6363
"react-dom": "^18.0.0",
6464
"vue": "^3.0.0",
@@ -71,7 +71,14 @@
7171
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
7272
"test": "npm run build && npm run test-coverage"
7373
},
74-
"xo": false,
74+
"xo": {
75+
"prettier": true,
76+
"rules": {
77+
"n/file-extension-in-import": "off",
78+
"unicorn/prefer-node-protocol": "off",
79+
"unicorn/prefer-string-replace-all": "off"
80+
}
81+
},
7582
"typeCoverage": {
7683
"atLeast": 100,
7784
"detail": true,

packages/loader/test/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ webpack.mdx:1:22: Unexpected end of file in expression, expected a corresponding
139139
)
140140

141141
assert.equal(
142+
// @ts-expect-error: preact + react conflict.
142143
render(h(modPreact.default.default, {})),
143144
'<h1>Hello, World!</h1>',
144145
'should compile (preact)'

packages/mdx/lib/util/extnames-to-regex.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
* Regex matching them.
88
*/
99
export function extnamesToRegex(extnames) {
10-
// eslint-disable-next-line security/detect-non-literal-regexp
1110
return new RegExp(
1211
'\\.(' + extnames.map((d) => d.slice(1)).join('|') + ')([?#]|$)'
1312
)

0 commit comments

Comments
 (0)