mirror of
https://github.com/mdx-js/mdx.git
synced 2024-09-11 15:05:32 +03:00
Update dev-dependencies
This commit is contained in:
parent
8a563128a3
commit
07e2b36edf
@ -716,7 +716,8 @@ button.success {
|
||||
margin-block: calc(2 * (1em + 1ex));
|
||||
overflow: hidden;
|
||||
/* yellow */
|
||||
background-image: radial-gradient(
|
||||
background-image:
|
||||
radial-gradient(
|
||||
ellipse at 0% 0%,
|
||||
rgb(252 180 45 / 5%) 20%,
|
||||
rgb(252 180 45 / 0%) 80%
|
||||
@ -1056,7 +1057,8 @@ button.success {
|
||||
|
||||
.card {
|
||||
/* yellow */
|
||||
background-image: radial-gradient(
|
||||
background-image:
|
||||
radial-gradient(
|
||||
ellipse at 0% 0%,
|
||||
rgb(252 180 45 / 10%) 20%,
|
||||
rgb(252 180 45 / 0%) 80%
|
||||
|
8496
package-lock.json
generated
8496
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
58
package.json
58
package.json
@ -40,14 +40,13 @@
|
||||
"chrome-aws-lambda": "^10.1.0",
|
||||
"codemirror": "^6.0.0",
|
||||
"cross-env": "^7.0.0",
|
||||
"cssnano": "^5.0.0",
|
||||
"cssnano": "^6.0.0",
|
||||
"dlv": "^1.0.0",
|
||||
"esbuild": "^0.17.0",
|
||||
"esbuild": "^0.19.0",
|
||||
"eslint-config-xo-react": "^0.27.0",
|
||||
"eslint-plugin-es": "^4.0.0",
|
||||
"eslint-plugin-react": "^7.0.0",
|
||||
"eslint-plugin-react-hooks": "^4.0.0",
|
||||
"eslint-plugin-security": "^1.0.0",
|
||||
"estree-util-value-to-estree": "^2.0.0",
|
||||
"estree-util-visit": "^1.0.0",
|
||||
"globby": "^13.0.0",
|
||||
@ -57,15 +56,15 @@
|
||||
"hastscript": "^7.0.0",
|
||||
"highlight.js": "^11.0.0",
|
||||
"husky": "^8.0.0",
|
||||
"lint-staged": "^13.0.0",
|
||||
"lint-staged": "^14.0.0",
|
||||
"lowlight": "^2.0.0",
|
||||
"p-all": "^4.0.0",
|
||||
"patch-package": "^6.0.0",
|
||||
"patch-package": "^8.0.0",
|
||||
"periscopic": "^3.0.0",
|
||||
"postcss": "^8.0.0",
|
||||
"postcss-cli": "^10.0.0",
|
||||
"prettier": "^2.0.0",
|
||||
"puppeteer-core": "^19.0.0",
|
||||
"prettier": "^3.0.0",
|
||||
"puppeteer-core": "^21.0.0",
|
||||
"react": "0.0.0-experimental-1159ff619-20220324",
|
||||
"react-dom": "0.0.0-experimental-1159ff619-20220324",
|
||||
"react-error-boundary": "^3.0.0",
|
||||
@ -115,7 +114,7 @@
|
||||
"xast-util-feed": "^1.0.0",
|
||||
"xast-util-sitemap": "^1.0.0",
|
||||
"xast-util-to-xml": "^3.0.0",
|
||||
"xo": "^0.54.0"
|
||||
"xo": "^0.56.0"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "patch-package",
|
||||
@ -130,8 +129,8 @@
|
||||
"docs-prod": "npm run docs-prep && npm run docs-bundle-prod && npm run docs-generate && npm run docs-prerender && npm run docs-post",
|
||||
"docs": "npm run docs-prod",
|
||||
"docs-deploy": "vercel && vercel alias $(pbpaste) mdxjs.com && vercel alias $(pbpaste) www.mdxjs.com",
|
||||
"format": "remark . -qfo && remark . -e mdx -u mdx -qfo && prettier . -w --loglevel warn && xo --fix",
|
||||
"lint": "remark . -qf && remark . -e mdx -u mdx -qf && prettier . -c --loglevel warn && xo",
|
||||
"format": "remark . -qfo && remark . -e mdx -u mdx -qfo && prettier . -w --log-level warn && xo --fix",
|
||||
"lint": "remark . -qf && remark . -e mdx -u mdx -qf && prettier . -c --log-level warn && xo",
|
||||
"build": "npm run build --workspaces --if-present",
|
||||
"test-api": "npm run test-api --workspaces --if-present",
|
||||
"test-coverage": "npm run test-coverage --workspaces --if-present",
|
||||
@ -165,23 +164,16 @@
|
||||
"envs": [
|
||||
"shared-node-browser"
|
||||
],
|
||||
"extensions": [
|
||||
"jsx",
|
||||
"cjs"
|
||||
],
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"import/extensions": "off",
|
||||
"n/file-extension-in-import": "off",
|
||||
"react/prop-types": "off",
|
||||
"unicorn/no-await-expression-member": "off",
|
||||
"unicorn/prefer-code-point": "off",
|
||||
"unicorn/prefer-at": "off",
|
||||
"unicorn/prefer-logical-operator-over-ternary": "off",
|
||||
"unicorn/prefer-node-protocol": "off",
|
||||
"unicorn/prefer-top-level-await": "off",
|
||||
"capitalized-comments": "off",
|
||||
"complexity": "off",
|
||||
"max-depth": "off"
|
||||
"complexity": "off"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
@ -194,35 +186,9 @@
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"docs/**/*.js",
|
||||
"packages/{mdx,react,preact}/test/**/*.{js,jsx}",
|
||||
"website/**/*.js"
|
||||
"docs/**/*.js"
|
||||
],
|
||||
"extends": "xo-react"
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"packages/*/lib/**/*.js",
|
||||
"packages/remark-mdx/index.js"
|
||||
],
|
||||
"extends": [
|
||||
"plugin:es/restrict-to-es2019",
|
||||
"plugin:security/recommended"
|
||||
],
|
||||
"rules": {
|
||||
"security/detect-object-injection": "off"
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": [
|
||||
"**/*.d.ts"
|
||||
],
|
||||
"rules": {
|
||||
"@typescript-eslint/consistent-indexed-object-style": [
|
||||
"error",
|
||||
"index-signature"
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -50,7 +50,6 @@ export function esbuild(options) {
|
||||
*/
|
||||
function setup(build) {
|
||||
const filter = extnamesToRegex(extnames)
|
||||
/* eslint-disable-next-line security/detect-non-literal-regexp */
|
||||
const filterHttp = new RegExp('^https?:\\/{2}.+' + filter.source)
|
||||
const http = /^https?:\/{2}/
|
||||
const filterHttpOrRelative = /^(https?:\/{2}|.{1,2}\/).*/
|
||||
@ -133,8 +132,7 @@ export function esbuild(options) {
|
||||
data.pluginData.contents !== null &&
|
||||
data.pluginData.contents !== undefined
|
||||
? data.pluginData.contents
|
||||
: /* eslint-disable-next-line security/detect-non-literal-fs-filename */
|
||||
await fs.readFile(data.path)
|
||||
: await fs.readFile(data.path)
|
||||
)
|
||||
|
||||
let file = new VFile({value: doc, path: data.path})
|
||||
|
@ -49,7 +49,7 @@
|
||||
"@types/react": "^18.0.0",
|
||||
"@types/react-dom": "^18.0.0",
|
||||
"@types/unist": "^2.0.0",
|
||||
"esbuild": "^0.17.0",
|
||||
"esbuild": "^0.19.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"vfile-message": "^3.0.0"
|
||||
@ -61,7 +61,15 @@
|
||||
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
|
||||
"test": "npm run build && npm run test-coverage"
|
||||
},
|
||||
"xo": false,
|
||||
"xo": {
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"complexity": "off",
|
||||
"n/file-extension-in-import": "off",
|
||||
"unicorn/no-await-expression-member": "off",
|
||||
"unicorn/prefer-node-protocol": "off"
|
||||
}
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
|
@ -1,7 +1,19 @@
|
||||
// Some TS versions use this file, some `index.d.ts`.
|
||||
type LoaderContext = import('webpack').LoaderContext<unknown>
|
||||
// Some TS versions use this file, some `index.d.cts`.
|
||||
import type {ProcessorOptions} from '@mdx-js/mdx/lib/core.js'
|
||||
import type {LoaderContext} from 'webpack'
|
||||
|
||||
declare function mdxLoader(this: LoaderContext, code: string): void
|
||||
export = mdxLoader
|
||||
/**
|
||||
* A Webpack loader to compile MDX to JavaScript.
|
||||
*
|
||||
* [Reference for Loader API](https://webpack.js.org/api/loaders/)
|
||||
*
|
||||
* @this {LoaderContext<unknown>}
|
||||
* @param {string} value
|
||||
* The original module source code.
|
||||
* @returns {void}
|
||||
*/
|
||||
declare function mdxLoader(this: LoaderContext<unknown>, value: string): void
|
||||
|
||||
export type Options = import('@mdx-js/mdx/lib/core.js').ProcessorOptions
|
||||
export default mdxLoader
|
||||
|
||||
export type Options = ProcessorOptions
|
||||
|
19
packages/loader/index.d.ts
vendored
19
packages/loader/index.d.ts
vendored
@ -1,19 +0,0 @@
|
||||
// Some TS versions use this file, some `index.d.cts`.
|
||||
import type {ProcessorOptions} from '@mdx-js/mdx/lib/core.js'
|
||||
import type {LoaderContext} from 'webpack'
|
||||
|
||||
/**
|
||||
* A Webpack loader to compile MDX to JavaScript.
|
||||
*
|
||||
* [Reference for Loader API](https://webpack.js.org/api/loaders/)
|
||||
*
|
||||
* @this {LoaderContext<unknown>}
|
||||
* @param {string} value
|
||||
* The original module source code.
|
||||
* @returns {void}
|
||||
*/
|
||||
declare function mdxLoader(this: LoaderContext<unknown>, value: string): void
|
||||
|
||||
export default mdxLoader
|
||||
|
||||
export type Options = ProcessorOptions
|
@ -58,7 +58,7 @@
|
||||
"@vue/server-renderer": "^3.0.0",
|
||||
"babel-loader": "^9.0.0",
|
||||
"preact": "^10.0.0",
|
||||
"preact-render-to-string": "^5.0.0",
|
||||
"preact-render-to-string": "^6.0.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"vue": "^3.0.0",
|
||||
@ -71,7 +71,14 @@
|
||||
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
|
||||
"test": "npm run build && npm run test-coverage"
|
||||
},
|
||||
"xo": false,
|
||||
"xo": {
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"n/file-extension-in-import": "off",
|
||||
"unicorn/prefer-node-protocol": "off",
|
||||
"unicorn/prefer-string-replace-all": "off"
|
||||
}
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
|
@ -139,6 +139,7 @@ webpack.mdx:1:22: Unexpected end of file in expression, expected a corresponding
|
||||
)
|
||||
|
||||
assert.equal(
|
||||
// @ts-expect-error: preact + react conflict.
|
||||
render(h(modPreact.default.default, {})),
|
||||
'<h1>Hello, World!</h1>',
|
||||
'should compile (preact)'
|
||||
|
@ -7,7 +7,6 @@
|
||||
* Regex matching them.
|
||||
*/
|
||||
export function extnamesToRegex(extnames) {
|
||||
// eslint-disable-next-line security/detect-non-literal-regexp
|
||||
return new RegExp(
|
||||
'\\.(' + extnames.map((d) => d.slice(1)).join('|') + ')([?#]|$)'
|
||||
)
|
||||
|
@ -72,7 +72,7 @@
|
||||
"@mdx-js/react": "^2.0.0",
|
||||
"nanoid": "^4.0.0",
|
||||
"preact": "^10.0.0",
|
||||
"preact-render-to-string": "^5.0.0",
|
||||
"preact-render-to-string": "^6.0.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"rehype-katex": "^6.0.0",
|
||||
@ -90,7 +90,18 @@
|
||||
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
|
||||
"test": "npm run build && npm run test-coverage"
|
||||
},
|
||||
"xo": false,
|
||||
"xo": {
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"complexity": "off",
|
||||
"max-depth": "off",
|
||||
"n/file-extension-in-import": "off",
|
||||
"unicorn/no-await-expression-member": "off",
|
||||
"unicorn/prefer-at": "off",
|
||||
"unicorn/prefer-code-point": "off",
|
||||
"unicorn/prefer-node-protocol": "off"
|
||||
}
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
|
@ -187,9 +187,13 @@ test('compile', async (t) => {
|
||||
await t.test(
|
||||
'should support an import source (`@jsxImportSource`)',
|
||||
async () => {
|
||||
const node = await run(
|
||||
compileSync('?', {jsxImportSource: 'preact/compat'})
|
||||
)
|
||||
assert.equal(
|
||||
render(
|
||||
h(await run(compileSync('?', {jsxImportSource: 'preact/compat'})), {})
|
||||
// @ts-expect-error: this fails because react/preact types conflict.
|
||||
h(node, {})
|
||||
),
|
||||
'<p>?</p>'
|
||||
)
|
||||
@ -200,19 +204,19 @@ test('compile', async (t) => {
|
||||
'should support `pragma`, `pragmaFrag` for `preact/compat`',
|
||||
|
||||
async () => {
|
||||
const node = await run(
|
||||
compileSync('<>%</>', {
|
||||
jsxRuntime: 'classic',
|
||||
pragma: 'preact.createElement',
|
||||
pragmaFrag: 'preact.Fragment',
|
||||
pragmaImportSource: 'preact/compat'
|
||||
})
|
||||
)
|
||||
|
||||
assert.equal(
|
||||
render(
|
||||
h(
|
||||
await run(
|
||||
compileSync('<>%</>', {
|
||||
jsxRuntime: 'classic',
|
||||
pragma: 'preact.createElement',
|
||||
pragmaFrag: 'preact.Fragment',
|
||||
pragmaImportSource: 'preact/compat'
|
||||
})
|
||||
),
|
||||
{}
|
||||
)
|
||||
// @ts-expect-error: this fails because react/preact types conflict.
|
||||
h(node, {})
|
||||
),
|
||||
'%'
|
||||
)
|
||||
@ -223,9 +227,12 @@ test('compile', async (t) => {
|
||||
'should support `jsxImportSource` for `preact`',
|
||||
|
||||
async () => {
|
||||
const node = await run(compileSync('<>1</>', {jsxImportSource: 'preact'}))
|
||||
|
||||
assert.equal(
|
||||
render(
|
||||
h(await run(compileSync('<>1</>', {jsxImportSource: 'preact'})), {})
|
||||
// @ts-expect-error: this fails because react/preact types conflict.
|
||||
h(node, {})
|
||||
),
|
||||
'1'
|
||||
)
|
||||
|
@ -50,7 +50,6 @@ export function createLoader(options) {
|
||||
return defaultLoad(url, context, defaultLoad)
|
||||
}
|
||||
|
||||
/* eslint-disable-next-line security/detect-non-literal-fs-filename */
|
||||
const value = await fs.readFile(fileURLToPath(new URL(url)))
|
||||
const file = await process(new VFile({value, path: new URL(url)}))
|
||||
let source = String(file)
|
||||
|
@ -53,7 +53,14 @@
|
||||
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
|
||||
"test": "npm run build && npm run test-coverage"
|
||||
},
|
||||
"xo": false,
|
||||
"xo": {
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"n/file-extension-in-import": "off",
|
||||
"unicorn/no-await-expression-member": "off",
|
||||
"unicorn/prefer-node-protocol": "off"
|
||||
}
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
|
@ -50,7 +50,7 @@
|
||||
"devDependencies": {
|
||||
"@mdx-js/mdx": "^2.0.0",
|
||||
"preact": "^10.0.0",
|
||||
"preact-render-to-string": "^5.0.0"
|
||||
"preact-render-to-string": "^6.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"prepack": "npm run build",
|
||||
@ -59,7 +59,21 @@
|
||||
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
|
||||
"test": "npm run build && npm run test-coverage"
|
||||
},
|
||||
"xo": false,
|
||||
"xo": {
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"**/*.jsx"
|
||||
],
|
||||
"extends": "xo-react"
|
||||
}
|
||||
],
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"n/file-extension-in-import": "off",
|
||||
"unicorn/prefer-node-protocol": "off"
|
||||
}
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
|
@ -21,6 +21,7 @@ test('should support `components` with `MDXProvider`', async () => {
|
||||
render(
|
||||
<MDXProvider
|
||||
components={{
|
||||
// @ts-expect-error: preact + react conflict.
|
||||
h1(props) {
|
||||
// @ts-expect-error: Something wrong with Preact + React maybe?
|
||||
return <h1 style={{color: 'tomato'}} {...props} />
|
||||
@ -30,7 +31,7 @@ test('should support `components` with `MDXProvider`', async () => {
|
||||
<Content />
|
||||
</MDXProvider>
|
||||
),
|
||||
'<h1 style="color: tomato;">hi</h1>'
|
||||
'<h1 style="color:tomato;">hi</h1>'
|
||||
)
|
||||
})
|
||||
|
||||
@ -44,6 +45,7 @@ test('should support `wrapper` in `components`', async () => {
|
||||
render(
|
||||
<MDXProvider
|
||||
components={{
|
||||
// @ts-expect-error: preact + react conflict.
|
||||
wrapper(/** @type {Record<string, unknown>} */ props) {
|
||||
return <div id="layout" {...props} />
|
||||
}
|
||||
@ -66,10 +68,12 @@ test('should combine components in nested `MDXProvider`s', async () => {
|
||||
render(
|
||||
<MDXProvider
|
||||
components={{
|
||||
// @ts-expect-error: preact + react conflict.
|
||||
h1(props) {
|
||||
// @ts-expect-error: Something wrong with Preact + React maybe?
|
||||
return <h1 style={{color: 'tomato'}} {...props} />
|
||||
},
|
||||
// @ts-expect-error: preact + react conflict.
|
||||
h2(props) {
|
||||
// @ts-expect-error: Something wrong with Preact + React maybe?
|
||||
return <h2 style={{color: 'rebeccapurple'}} {...props} />
|
||||
@ -78,6 +82,7 @@ test('should combine components in nested `MDXProvider`s', async () => {
|
||||
>
|
||||
<MDXProvider
|
||||
components={{
|
||||
// @ts-expect-error: preact + react conflict.
|
||||
h2(props) {
|
||||
// @ts-expect-error: Something wrong with Preact + React maybe?
|
||||
return <h2 style={{color: 'papayawhip'}} {...props} />
|
||||
@ -88,7 +93,7 @@ test('should combine components in nested `MDXProvider`s', async () => {
|
||||
</MDXProvider>
|
||||
</MDXProvider>
|
||||
),
|
||||
'<h1 style="color: tomato;">hi</h1>\n<h2 style="color: papayawhip;">hello</h2>'
|
||||
'<h1 style="color:tomato;">hi</h1>\n<h2 style="color:papayawhip;">hello</h2>'
|
||||
)
|
||||
})
|
||||
|
||||
@ -102,10 +107,12 @@ test('should support components as a function', async () => {
|
||||
render(
|
||||
<MDXProvider
|
||||
components={{
|
||||
// @ts-expect-error: preact + react conflict.
|
||||
h1(props) {
|
||||
// @ts-expect-error: Something wrong with Preact + React maybe?
|
||||
return <h1 style={{color: 'tomato'}} {...props} />
|
||||
},
|
||||
// @ts-expect-error: preact + react conflict.
|
||||
h2(props) {
|
||||
// @ts-expect-error: Something wrong with Preact + React maybe?
|
||||
return <h2 style={{color: 'rebeccapurple'}} {...props} />
|
||||
@ -113,6 +120,7 @@ test('should support components as a function', async () => {
|
||||
}}
|
||||
>
|
||||
<MDXProvider
|
||||
// @ts-expect-error: preact + react conflict.
|
||||
components={() => ({
|
||||
h2(props) {
|
||||
// @ts-expect-error: Something wrong with Preact + React maybe?
|
||||
@ -124,7 +132,7 @@ test('should support components as a function', async () => {
|
||||
</MDXProvider>
|
||||
</MDXProvider>
|
||||
),
|
||||
'<h1>hi</h1>\n<h2 style="color: papayawhip;">hello</h2>'
|
||||
'<h1>hi</h1>\n<h2 style="color:papayawhip;">hello</h2>'
|
||||
)
|
||||
})
|
||||
|
||||
@ -138,6 +146,7 @@ test('should support a `disableParentContext` prop (sandbox)', async () => {
|
||||
render(
|
||||
<MDXProvider
|
||||
components={{
|
||||
// @ts-expect-error: preact + react conflict.
|
||||
h1(props) {
|
||||
// @ts-expect-error: Something wrong with Preact + React maybe?
|
||||
return <h1 style={{color: 'tomato'}} {...props} />
|
||||
@ -163,6 +172,7 @@ test('should support a `disableParentContext` *and* `components as a function',
|
||||
render(
|
||||
<MDXProvider
|
||||
components={{
|
||||
// @ts-expect-error: preact + react conflict.
|
||||
h1(props) {
|
||||
// @ts-expect-error: Something wrong with Preact + React maybe?
|
||||
return <h1 style={{color: 'tomato'}} {...props} />
|
||||
@ -171,6 +181,7 @@ test('should support a `disableParentContext` *and* `components as a function',
|
||||
>
|
||||
<MDXProvider
|
||||
disableParentContext
|
||||
// @ts-expect-error: preact + react conflict.
|
||||
components={() => ({
|
||||
h2(props) {
|
||||
// @ts-expect-error: Something wrong with Preact + React maybe?
|
||||
@ -182,7 +193,7 @@ test('should support a `disableParentContext` *and* `components as a function',
|
||||
</MDXProvider>
|
||||
</MDXProvider>
|
||||
),
|
||||
'<h1>hi</h1>\n<h2 style="color: papayawhip;">hello</h2>'
|
||||
'<h1>hi</h1>\n<h2 style="color:papayawhip;">hello</h2>'
|
||||
)
|
||||
})
|
||||
|
||||
@ -202,6 +213,7 @@ test('should support `withComponents`', async () => {
|
||||
render(
|
||||
<MDXProvider
|
||||
components={{
|
||||
// @ts-expect-error: preact + react conflict.
|
||||
h1(props) {
|
||||
// @ts-expect-error: Something wrong with Preact + React maybe?
|
||||
return <h1 style={{color: 'tomato'}} {...props} />
|
||||
@ -210,6 +222,7 @@ test('should support `withComponents`', async () => {
|
||||
>
|
||||
<With
|
||||
components={{
|
||||
// @ts-expect-error: preact + react conflict.
|
||||
h2(props) {
|
||||
// @ts-expect-error: Something wrong with Preact + React maybe?
|
||||
return <h2 style={{color: 'papayawhip'}} {...props} />
|
||||
@ -220,6 +233,6 @@ test('should support `withComponents`', async () => {
|
||||
</With>
|
||||
</MDXProvider>
|
||||
),
|
||||
'<h1 style="color: tomato;">hi</h1>\n<h2>hello</h2>'
|
||||
'<h1 style="color:tomato;">hi</h1>\n<h2>hello</h2>'
|
||||
)
|
||||
})
|
||||
|
@ -61,7 +61,21 @@
|
||||
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
|
||||
"test": "npm run build && npm run test-coverage"
|
||||
},
|
||||
"xo": false,
|
||||
"xo": {
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"**/*.jsx"
|
||||
],
|
||||
"extends": "xo-react"
|
||||
}
|
||||
],
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"n/file-extension-in-import": "off",
|
||||
"unicorn/prefer-node-protocol": "off"
|
||||
}
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
|
@ -54,7 +54,13 @@
|
||||
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
|
||||
"test": "npm run test-coverage"
|
||||
},
|
||||
"xo": false,
|
||||
"xo": {
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"n/file-extension-in-import": "off",
|
||||
"unicorn/prefer-node-protocol": "off"
|
||||
}
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
|
@ -58,7 +58,14 @@
|
||||
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
|
||||
"test": "npm run build && npm run test-coverage"
|
||||
},
|
||||
"xo": false,
|
||||
"xo": {
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"n/file-extension-in-import": "off",
|
||||
"unicorn/prefer-logical-operator-over-ternary": "off",
|
||||
"unicorn/prefer-node-protocol": "off"
|
||||
}
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
|
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @typedef {import('@rollup/pluginutils').FilterPattern} FilterPattern
|
||||
* @typedef {import('rollup').Plugin} Plugin
|
||||
* @typedef {import('rollup').Plugin<unknown>} Plugin
|
||||
* @typedef {import('rollup').SourceDescription} SourceDescription
|
||||
*/
|
||||
|
||||
|
@ -60,7 +60,14 @@
|
||||
"test-coverage": "c8 --check-coverage --100 --reporter lcov npm run test-api",
|
||||
"test": "npm run build && npm run test-coverage"
|
||||
},
|
||||
"xo": false,
|
||||
"xo": {
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"n/file-extension-in-import": "off",
|
||||
"unicorn/no-await-expression-member": "off",
|
||||
"unicorn/prefer-node-protocol": "off"
|
||||
}
|
||||
},
|
||||
"typeCoverage": {
|
||||
"atLeast": 100,
|
||||
"detail": true,
|
||||
|
@ -62,5 +62,13 @@
|
||||
"strict": true,
|
||||
"ignoreCatch": true
|
||||
},
|
||||
"xo": {
|
||||
"prettier": true,
|
||||
"rules": {
|
||||
"n/file-extension-in-import": "off",
|
||||
"unicorn/prefer-node-protocol": "off",
|
||||
"unicorn/prefer-string-replace-all": "off"
|
||||
}
|
||||
},
|
||||
"gitHead": "bf7deab69996449cb99c2217dff75e65855eb2c1"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user