diff --git a/.changeset/ninety-bugs-dance.md b/.changeset/ninety-bugs-dance.md new file mode 100644 index 00000000..32d775b8 --- /dev/null +++ b/.changeset/ninety-bugs-dance.md @@ -0,0 +1,5 @@ +--- +"eslint-mdx": patch +--- + +fix: incorrect `JSXAttribute` node position info - close #488, related #425 diff --git a/.changeset/tasty-actors-protect.md b/.changeset/tasty-actors-protect.md new file mode 100644 index 00000000..8c9c11ce --- /dev/null +++ b/.changeset/tasty-actors-protect.md @@ -0,0 +1,6 @@ +--- +"eslint-mdx": patch +"eslint-plugin-mdx": patch +--- + +fix: incompatible with some react rules: `jsx-curly-brace-presence`, `jsx-sort-props`, `self-closing-comp` diff --git a/.eslintrc.js b/.eslintrc.js index ddfaaa65..746a57d3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -21,11 +21,20 @@ module.exports = { { files: '*.{md,mdx}', rules: { + 'react/jsx-curly-brace-presence': 'error', + 'react/jsx-sort-props': 'error', + 'react/self-closing-comp': 'error', 'react/no-unescaped-entities': 'warn', }, settings: { 'mdx/code-blocks': true, }, }, + { + files: '**/*.{md,mdx}/**/*.ts', + rules: { + 'no-magic-numbers': 'off', + }, + }, ], } diff --git a/.gitignore b/.gitignore index 57118d90..96a20134 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,9 @@ *.tsbuildinfo .*cache .changelog +.idea .type-coverage coverage lib node_modules -/test.mdx -.idea/ +/test.* diff --git a/README.md b/README.md index 89fc4eab..3f46a4dc 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,10 @@ - [Classic](#classic) - [Flat Config](#flat-config) - [Parser Options](#parser-options) +- [Parser API](#parser-api) + - [`MDXCode`](#mdxcode) + - [`MDXHeading`](#mdxheading) + - [Typings](#typings) - [Rules](#rules) - [mdx/remark](#mdxremark) - [Prettier Integration](#prettier-integration) @@ -47,7 +51,7 @@ [![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/unifiedjs.vscode-mdx)](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) -[VSCode MDX][]\: Integrates with [VSCode ESLint][], syntaxes highlighting and error reporting. +[VSCode MDX][]: Integrates with [VSCode ESLint][], syntaxes highlighting and error reporting. ## Packages @@ -137,6 +141,56 @@ eslint . --ext js,md,mdx 3. `ignoreRemarkConfig` (`boolean`): Ignore the `remark` configuration defined in the project. +## Parser API + +### `MDXCode` + +A new `MDXCode` estree node type is exported from `eslint-mdx` which represents code blocks in `mdx` like the following: + +````mdx +
+ ```js + export function foo() { + return 'bar' + } + ``` +
+```` + +See also + +### `MDXHeading` + +A new `MDXHeading` estree node type is exported from `eslint-mdx` which represents markdown heading in `mdx` like the following: + +```mdx +
# Here's a text gradient short code!
+``` + +See also + +### Typings + +```ts +import type { BaseNode } from 'estree' +import type { JSXElement } from 'estree-jsx' + +export interface MDXCode extends BaseNode { + type: 'MDXCode' + value: string + lang?: string | null + meta?: string | null +} + +export type HeadingDepth = 1 | 2 | 3 | 4 | 5 | 6 + +export interface MDXHeading extends BaseNode { + type: 'MDXHeading' + depth: HeadingDepth + children: JSXElement['children'] +} +``` + ## Rules ### mdx/remark diff --git a/package.json b/package.json index 2ee8bb5a..fecdaf89 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "typecov": "type-coverage" }, "devDependencies": { - "@1stg/lib-config": "^12.0.0", + "@1stg/lib-config": "^12.0.1", "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.2", "@types/eslint": "^8.44.1", @@ -58,6 +58,7 @@ "fixtures", "lib", "CHANGELOG.md", + "/test.*", "!/.*.js" ], "jest": { diff --git a/packages/eslint-mdx/README.md b/packages/eslint-mdx/README.md index 89fc4eab..3f46a4dc 100644 --- a/packages/eslint-mdx/README.md +++ b/packages/eslint-mdx/README.md @@ -35,6 +35,10 @@ - [Classic](#classic) - [Flat Config](#flat-config) - [Parser Options](#parser-options) +- [Parser API](#parser-api) + - [`MDXCode`](#mdxcode) + - [`MDXHeading`](#mdxheading) + - [Typings](#typings) - [Rules](#rules) - [mdx/remark](#mdxremark) - [Prettier Integration](#prettier-integration) @@ -47,7 +51,7 @@ [![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/unifiedjs.vscode-mdx)](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) -[VSCode MDX][]\: Integrates with [VSCode ESLint][], syntaxes highlighting and error reporting. +[VSCode MDX][]: Integrates with [VSCode ESLint][], syntaxes highlighting and error reporting. ## Packages @@ -137,6 +141,56 @@ eslint . --ext js,md,mdx 3. `ignoreRemarkConfig` (`boolean`): Ignore the `remark` configuration defined in the project. +## Parser API + +### `MDXCode` + +A new `MDXCode` estree node type is exported from `eslint-mdx` which represents code blocks in `mdx` like the following: + +````mdx +
+ ```js + export function foo() { + return 'bar' + } + ``` +
+```` + +See also + +### `MDXHeading` + +A new `MDXHeading` estree node type is exported from `eslint-mdx` which represents markdown heading in `mdx` like the following: + +```mdx +
# Here's a text gradient short code!
+``` + +See also + +### Typings + +```ts +import type { BaseNode } from 'estree' +import type { JSXElement } from 'estree-jsx' + +export interface MDXCode extends BaseNode { + type: 'MDXCode' + value: string + lang?: string | null + meta?: string | null +} + +export type HeadingDepth = 1 | 2 | 3 | 4 | 5 | 6 + +export interface MDXHeading extends BaseNode { + type: 'MDXHeading' + depth: HeadingDepth + children: JSXElement['children'] +} +``` + ## Rules ### mdx/remark diff --git a/packages/eslint-mdx/src/parser.ts b/packages/eslint-mdx/src/parser.ts index 4072eb3f..1b373c32 100644 --- a/packages/eslint-mdx/src/parser.ts +++ b/packages/eslint-mdx/src/parser.ts @@ -63,11 +63,16 @@ export class Parser { }) } catch (err: unknown) { const error = err as VFileMessage - throw Object.assign(new SyntaxError(error.message), { - lineNumber: error.line, - column: error.column, - index: /* istanbul ignore next */ error.position?.start.offset, - }) + throw Object.assign( + new SyntaxError(error.message, { + cause: error, + }), + { + lineNumber: error.line, + column: error.column, + index: /* istanbul ignore next */ error.position?.start.offset, + }, + ) } const { root, body, comments, tokens } = result diff --git a/packages/eslint-mdx/src/types.ts b/packages/eslint-mdx/src/types.ts index e413eb9f..51a1bdda 100644 --- a/packages/eslint-mdx/src/types.ts +++ b/packages/eslint-mdx/src/types.ts @@ -1,6 +1,7 @@ import type { Position } from 'acorn' import type { AST, Linter } from 'eslint' -import type { Program } from 'estree' +import type { BaseNode, Program } from 'estree' +import type { JSXElement } from 'estree-jsx' import type { Root } from 'mdast' import type { VFileOptions } from 'vfile' import type { VFileMessage } from 'vfile-message' @@ -43,3 +44,22 @@ export interface WorkerProcessResult { } export type WorkerResult = WorkerParseResult | WorkerProcessResult + +type _Arrayable ? U : T> = R | R[] + +export type Arrayable = _Arrayable + +export interface MDXCode extends BaseNode { + type: 'MDXCode' + value: string + lang?: string | null + meta?: string | null +} + +export type HeadingDepth = 1 | 2 | 3 | 4 | 5 | 6 + +export interface MDXHeading extends BaseNode { + type: 'MDXHeading' + depth: HeadingDepth + children: JSXElement['children'] +} diff --git a/packages/eslint-mdx/src/worker.ts b/packages/eslint-mdx/src/worker.ts index 4608728a..8872cc80 100644 --- a/packages/eslint-mdx/src/worker.ts +++ b/packages/eslint-mdx/src/worker.ts @@ -18,15 +18,20 @@ import type { import type { JSXClosingElement, JSXElement, + JSXExpressionContainer, JSXFragment, JSXIdentifier, JSXMemberExpression, JSXNamespacedName, + JSXText, } from 'estree-jsx' import type { BlockContent, + Code, + Heading, + Paragraph, PhrasingContent, - Literal as MdastLiteral, + Literal, } from 'mdast' import type { Options } from 'micromark-extension-mdx-expression' import type { Root } from 'remark-mdx' @@ -44,7 +49,14 @@ import { prevCharOffsetFactory, } from './helpers' import { restoreTokens } from './tokens' -import type { NormalPosition, WorkerOptions, WorkerResult } from './types' +import type { + Arrayable, + MDXCode, + MDXHeading, + NormalPosition, + WorkerOptions, + WorkerResult, +} from './types' let config: Configuration @@ -184,6 +196,12 @@ export const getRemarkProcessor = async ( return cachedProcessor } +function isExpressionStatement( + statement: Program['body'][number], +): asserts statement is ExpressionStatement | undefined { + assert(!statement || statement.type === 'ExpressionStatement') +} + runAsWorker( async ({ fileOptions, @@ -363,12 +381,12 @@ runAsWorker( processed.add(node) function handleChildren( - node: BlockContent | MdastLiteral | PhrasingContent, + node: BlockContent | Literal | Paragraph | PhrasingContent, ) { return 'children' in node - ? (node.children as Array).reduce< - JSXElement['children'] - >((acc, child) => { + ? ( + node.children as Array + ).reduce((acc, child) => { processed.add(child) if (child.data && 'estree' in child.data && child.data.estree) { @@ -376,20 +394,39 @@ runAsWorker( assert(estree.body.length <= 1) - const expStat = estree.body[0] as ExpressionStatement + const statement = estree.body[0] - if (expStat) { - const expression = - expStat.expression as BaseExpression as JSXElement['children'][number] - acc.push(expression) + isExpressionStatement(statement) + + const expression = statement?.expression + + if (child.type === 'mdxTextExpression') { + const { + start: { offset: start }, + end: { offset: end }, + } = node.position + + const expressionContainer: JSXExpressionContainer = { + ...normalizeNode(start, end), + type: 'JSXExpressionContainer', + expression: expression || { + ...normalizeNode(start + 1, end - 1), + type: 'JSXEmptyExpression', + }, + } + acc.push(expressionContainer) + } else if (expression) { + acc.push(expression as JSXElement['children'][number]) } comments.push(...estree.comments) } else { - const expression = handleNode( - child, - ) as JSXElement['children'][number] - if (expression) { + const expression = handleNode(child) as Arrayable< + JSXElement['children'] + > + if (Array.isArray(expression)) { + acc.push(...expression) + } else if (expression) { acc.push(expression) } } @@ -400,8 +437,49 @@ runAsWorker( } function handleNode( - node: BlockContent | MdastLiteral | PhrasingContent, + node: BlockContent | Literal | Paragraph | PhrasingContent, ) { + if (node.type === 'paragraph') { + return handleChildren(node) + } + + const { + start: { offset: start }, + end: { offset: end }, + } = node.position + + if (node.type === 'code') { + const { lang, meta, value } = node as Code + const mdxJsxCode: MDXCode = { + ...normalizeNode(start, end), + type: 'MDXCode', + lang, + meta, + value, + } + return mdxJsxCode + } + + if (node.type === 'heading') { + const { depth } = node as Heading + const mdxJsxHeading: MDXHeading = { + ...normalizeNode(start, end), + type: 'MDXHeading', + depth, + children: handleChildren(node), + } + return mdxJsxHeading + } + + if (node.type === 'text') { + const jsxText: JSXText = { + ...normalizeNode(start, end), + type: 'JSXText', + value: node.value, + } + return jsxText + } + if ( node.type !== 'mdxJsxTextElement' && node.type !== 'mdxJsxFlowElement' @@ -411,6 +489,11 @@ runAsWorker( const children = handleChildren(node) + // keep for debugging + // if (+1 === 1) { + // throw new SyntaxError(JSON.stringify({ node, children }, null, 2)) + // } + const nodePos = node.position const nodeStart = nodePos.start.offset @@ -550,7 +633,7 @@ runAsWorker( } return { - ...attrNamePos, + ...normalizeNode(attrStart, lastAttrOffset + 1), type: 'JSXAttribute', name: { ...attrNamePos, @@ -628,13 +711,18 @@ runAsWorker( return expression } - const expression = handleNode(node) as Expression + const expression = handleNode(node) + + // keep for debugging + // if (+1 === 1) { + // throw new SyntaxError(JSON.stringify({ node, expression }, null, 2)) + // } if (expression) { body.push({ ...normalizePosition(node.position), type: 'ExpressionStatement', - expression: handleNode(node) as Expression, + expression: expression as Expression, }) } @@ -664,7 +752,7 @@ runAsWorker( } /** - * Copied from @see https://github.com/eslint/espree/blob/main/lib/espree.js#L206-L220 + * Copied from @see https://github.com/eslint/espree/blob/1584ddb00f0b4e3ada764ac86ae20e1480003de3/lib/espree.js#L227-L241 */ const templateElement = node diff --git a/packages/eslint-plugin-mdx/README.md b/packages/eslint-plugin-mdx/README.md index 89fc4eab..3f46a4dc 100644 --- a/packages/eslint-plugin-mdx/README.md +++ b/packages/eslint-plugin-mdx/README.md @@ -35,6 +35,10 @@ - [Classic](#classic) - [Flat Config](#flat-config) - [Parser Options](#parser-options) +- [Parser API](#parser-api) + - [`MDXCode`](#mdxcode) + - [`MDXHeading`](#mdxheading) + - [Typings](#typings) - [Rules](#rules) - [mdx/remark](#mdxremark) - [Prettier Integration](#prettier-integration) @@ -47,7 +51,7 @@ [![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/unifiedjs.vscode-mdx)](https://marketplace.visualstudio.com/items?itemName=unifiedjs.vscode-mdx) -[VSCode MDX][]\: Integrates with [VSCode ESLint][], syntaxes highlighting and error reporting. +[VSCode MDX][]: Integrates with [VSCode ESLint][], syntaxes highlighting and error reporting. ## Packages @@ -137,6 +141,56 @@ eslint . --ext js,md,mdx 3. `ignoreRemarkConfig` (`boolean`): Ignore the `remark` configuration defined in the project. +## Parser API + +### `MDXCode` + +A new `MDXCode` estree node type is exported from `eslint-mdx` which represents code blocks in `mdx` like the following: + +````mdx +
+ ```js + export function foo() { + return 'bar' + } + ``` +
+```` + +See also + +### `MDXHeading` + +A new `MDXHeading` estree node type is exported from `eslint-mdx` which represents markdown heading in `mdx` like the following: + +```mdx +
# Here's a text gradient short code!
+``` + +See also + +### Typings + +```ts +import type { BaseNode } from 'estree' +import type { JSXElement } from 'estree-jsx' + +export interface MDXCode extends BaseNode { + type: 'MDXCode' + value: string + lang?: string | null + meta?: string | null +} + +export type HeadingDepth = 1 | 2 | 3 | 4 | 5 | 6 + +export interface MDXHeading extends BaseNode { + type: 'MDXHeading' + depth: HeadingDepth + children: JSXElement['children'] +} +``` + ## Rules ### mdx/remark diff --git a/test/__snapshots__/fixtures.test.ts.snap b/test/__snapshots__/fixtures.test.ts.snap index 8b904b83..1d4a3c31 100644 --- a/test/__snapshots__/fixtures.test.ts.snap +++ b/test/__snapshots__/fixtures.test.ts.snap @@ -160,6 +160,59 @@ import React from 'react' ] `; +exports[`fixtures lint code blocks should work as expected: code-blocks.md 2`] = ` +"# abc + +# abc + +
Hello World!
+ + + +\`\`\`JavaScript +export var a = 1 == 2 + +export const b = [a].flat() +\`\`\` + + export var a = 1 == 2 + +\`\`\`log +This is not parsable as JavaScript! +\`\`\` + + + +\`\`\`jsx +export const App = () =>
2 > 1
+\`\`\` + + + +\`\`\`TypeScript +export type Value = 1 | 2 | 3 | 4 | 5 +\`\`\` + +\`\`\`MarkDown +# abc + +# abc +\`\`\` + + + +\`\`\`mdx +import React from 'react' + +
Header
+ +# abc + +# abc +\`\`\` +" +`; + exports[`fixtures lint code blocks should work as expected: code-blocks.mdx 1`] = ` [ { @@ -219,6 +272,19 @@ exports[`fixtures lint code blocks should work as expected: code-blocks.mdx 1`] ] `; +exports[`fixtures lint code blocks should work as expected: code-blocks.mdx 2`] = ` +"\`\`\`js +let a + +const b = [1, 2, 3] + +const c = b.at(-1) + +export { c } +\`\`\` +" +`; + exports[`fixtures should match all snapshots: 287.mdx 1`] = `[]`; exports[`fixtures should match all snapshots: 292.mdx 1`] = ` @@ -246,7 +312,7 @@ exports[`fixtures should match all snapshots: 292.mdx 1`] = ` }, { "column": 46, - "endColumn": 51, + "endColumn": 58, "endLine": 5, "line": 5, "message": "Unknown property 'story' found", @@ -258,6 +324,21 @@ exports[`fixtures should match all snapshots: 292.mdx 1`] = ` ] `; +exports[`fixtures should match all snapshots: 292.mdx 2`] = ` +"# Header + +paragraph
content
+ +- -
+ Vuetify preset +
+ : some extra text describing the preset +" +`; + exports[`fixtures should match all snapshots: 334.mdx 1`] = `[]`; exports[`fixtures should match all snapshots: 336.mdx 1`] = `[]`; @@ -287,8 +368,131 @@ exports[`fixtures should match all snapshots: 371.mdx 1`] = ` ] `; +exports[`fixtures should match all snapshots: 371.mdx 2`] = ` +"# Hello, World! + +
+ +\`\`\`js +function foo() { + return 123 +} +\`\`\` + +
+" +`; + exports[`fixtures should match all snapshots: 380.mdx 1`] = ` [ + { + "column": 3, + "endColumn": 13, + "endLine": 21, + "fix": { + "range": [ + 426, + 720, + ], + "text": "decorators={[ + moduleMetadata({ + imports: [ + ButtonModule, + IconModule, + FormsModule, + FormModule, + RadioModule, + TabsModule, + CardModule, + ], + declarations: [ActiveTestComponent, LazyTestComponent], + }), + ]} + title="Tabs"", + }, + "line": 21, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, + { + "column": 5, + "endColumn": 11, + "endLine": 46, + "fix": { + "range": [ + 824, + 855, + ], + "text": "height="100px" + name="Basic"", + }, + "line": 46, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, + { + "column": 5, + "endColumn": 11, + "endLine": 83, + "fix": { + "range": [ + 1499, + 1529, + ], + "text": "height="200px" + name="Card"", + }, + "line": 83, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, + { + "column": 5, + "endColumn": 11, + "endLine": 105, + "fix": { + "range": [ + 1982, + 2012, + ], + "text": "height="200px" + name="Size"", + }, + "line": 105, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, + { + "column": 5, + "endColumn": 11, + "endLine": 139, + "fix": { + "range": [ + 2920, + 2957, + ], + "text": "height="200px" + name="CustomLabel"", + }, + "line": 139, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, { "column": 28, "endColumn": 24, @@ -326,6 +530,25 @@ exports[`fixtures should match all snapshots: 380.mdx 1`] = ` "ruleId": "unicorn/template-indent", "severity": 2, }, + { + "column": 5, + "endColumn": 11, + "endLine": 174, + "fix": { + "range": [ + 3750, + 3784, + ], + "text": "height="100px" + name="Editable"", + }, + "line": 174, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, { "column": 13, "endColumn": 16, @@ -423,6 +646,63 @@ exports[`fixtures should match all snapshots: 380.mdx 1`] = ` "ruleId": "unicorn/prefer-at", "severity": 2, }, + { + "column": 5, + "endColumn": 11, + "endLine": 220, + "fix": { + "range": [ + 4788, + 4822, + ], + "text": "height="100px" + name="Disabled"", + }, + "line": 220, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, + { + "column": 5, + "endColumn": 11, + "endLine": 253, + "fix": { + "range": [ + 5581, + 5611, + ], + "text": "height="150px" + name="Lazy"", + }, + "line": 253, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, + { + "column": 5, + "endColumn": 11, + "endLine": 299, + "fix": { + "range": [ + 6792, + 6822, + ], + "text": "height="100px" + name="Nest"", + }, + "line": 299, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, { "column": 28, "endColumn": 26, @@ -476,9 +756,447 @@ exports[`fixtures should match all snapshots: 380.mdx 1`] = ` "ruleId": "unicorn/template-indent", "severity": 2, }, + { + "column": 5, + "endColumn": 11, + "endLine": 348, + "fix": { + "range": [ + 8233, + 8264, + ], + "text": "height="100px" + name="Title"", + }, + "line": 348, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, ] `; +exports[`fixtures should match all snapshots: 380.mdx 2`] = ` +"import { FormsModule } from '@angular/forms' +import { Canvas, Meta, Story } from '@storybook/addon-docs' +import { moduleMetadata } from '@storybook/angular' + +import { ActiveTestComponent } from './active-test.component' +import { LazyTestComponent } from './lazy-test.component' + +import { + ButtonModule, + IconModule, + FormModule, + RadioModule, + TabSize, + TabType, + TabsModule, + CardModule, +} from '@alauda/ui' + + + +# Tabs + +> 移植自 Angular Material, 增加了风格(卡片/线条)和尺寸(大/中/小)选项和 lazy 模式。 + +## 基础用法 + + + + {{ + template: /* HTML */ \` + + + Content 1 + + + Content 2 + + + Content 3 + + + \`, + props: { + tab: 'a', + }, + }} + + + +## Card + + + + {{ + template: /* HTML */ \` + + Content 1 + Content 2 + Content 3 + + \`, + props: { + type: TabType.Card, + }, + }} + + + +## Size + + + + {{ + template: /* HTML */ \` + + + + + + + + + + Content 1 + Content 2 + Content 3 + + \`, + props: { + size: TabSize.Medium, + }, + }} + + + +## 自定义 Label + + + + {{ + template: /* HTML */ \` + + aa2 + + + + Custom Label + + Content 1 + + Content 2 + + + + Custom Label + + Content 3 + + + \`, + props: { + tabs: Array.from({ length: 3 }).fill(), + }, + }} + + + +## 添加删除 + +> 通过自定义 Group Header 实现 + + + + {{ + template: /* HTML */ \` + + + content {{ i }} + + + + \`, + props: { + tabs: [1, 2, 3], + add(number_ = 1) { + this.tabs = this.tabs.concat( + Array.from({ length: number_ }) + .fill() + .map((_, index) => this.tabs.at(-1) + index + 1), + ) + }, + remove(index) { + this.tabs.splice(index, 1) + }, + }, + }} + + + +## 禁用 + + + + {{ + template: /* HTML */ \` + + Content 1 + Content 2 + Content 3 + Content 4 + + \`, + props: { + tabs: Array.from({ length: 10 }).fill(), + }, + }} + + + +## Lazy 模式 + +> 依赖 \`*auiTabContent\`,与默认模式按需加载每次切换 Tab 都会销毁重新创建相比,lazy 启用时在按需加载组件的同时会缓存已加载的 Tab 内容。 + + + + {{ + template: /* HTML */ \` + + + + + + + + + + Content 1 + + + Content 2 + + + Content 3 + + + \`, + props: { + tabs: Array.from({ length: 10 }).fill(), + lazy: true, + }, + }} + + + +## Tab 嵌套 + + + + {{ + template: /* HTML */ \` + + + + + + + + + + Content 1 + + + + + + + Content 2-1 + + + + + Content 2-2 + + + + + + + \`, + props: { + lazy: true, + }, + }} + + + +## 自定义 Title + + + + {{ + template: /* HTML */ \` + + Title + Content 1 + Content 2 + Content 3 + Content 4 + + \`, + }} + + + +## TabGroupComponent Inputs + +| 名称 | 类型 | 默认值 | 描述 | +| ------------- | ------- | -------------- | --------------- | +| type | TabType | TabType.Line | 样式主题 | +| size | TabSize | TabSize.Medium | 尺寸 | +| tab | string | - | 选中 Tab 的名称 | +| selectedIndex | number | - | 选中 Tab 的索引 | +| lazy | boolean | false | 懒加载模式 | + +## TabGroupComponent Outputs + +\`\`\`ts +interface TabChangeEvent { + index: number + tab: TabComponent +} +\`\`\` + +| 名称 | 类型 | 描述 | +| ------------------- | -------------- | ----------------------------- | +| tabChange | string | Tab 切换时发射 Tab 的名称 | +| selectedIndexChange | number | Tab 切换时发射 Tab 的索引 | +| selectedTabChange | TabChangeEvent | Tab 切换时发射 TabChangeEvent | +| focusChange | TabChangeEvent | Tab \`focus\` 切换时发射 | + +## TabComponent Inputs + +| 名称 | 类型 | 默认值 | 说明 | +| --------- | ------- | ------ | ---------------- | +| name | string | - | tab 的名称 | +| label | string | - | 文字 label | +| closeable | boolean | false | 是否显示关闭按键 | +| disabled | boolean | false | 是否禁用此 tab | + +## TabComponent Outputs + +| 名称 | 类型 | 描述 | +| ----- | ---- | -------------------- | +| close | void | 关闭按键被点击时发射 | + +## Directives + +| 名称 | 作用范围 | 描述 | +| ----------------- | ----------------- | --------------------------- | +| auiTabHeaderAddon | TabGroupComponent | 自定义 Group Header | +| auiTabLabel | TabComponent | 自定义 Tab Label | +| auiTabContent | TabComponent | Tab 内容区域,lazy 模式必用 | +" +`; + exports[`fixtures should match all snapshots: 391.mdx 1`] = ` [ { @@ -495,6 +1213,8 @@ exports[`fixtures should match all snapshots: 391.mdx 1`] = ` ] `; +exports[`fixtures should match all snapshots: 391.mdx 2`] = `undefined`; + exports[`fixtures should match all snapshots: 429.mdx 1`] = ` [ { @@ -518,6 +1238,13 @@ exports[`fixtures should match all snapshots: 429.mdx 1`] = ` ] `; +exports[`fixtures should match all snapshots: 429.mdx 2`] = ` +" + + + +- list + + +" +`; + +exports[`fixtures should match all snapshots: 437.mdx 1`] = ` +[ + { + "column": 1, + "endColumn": 32, + "endLine": 1, + "fix": { + "range": [ + 0, + 31, + ], + "text": "bar", + }, + "line": 1, + "message": "Curly braces are unnecessary here.", + "messageId": "unnecessaryCurly", + "nodeType": "JSXExpressionContainer", + "ruleId": "react/jsx-curly-brace-presence", + "severity": 2, + }, + { + "column": 2, + "endColumn": 5, + "endLine": 1, + "line": 1, + "message": "'App' is not defined.", + "messageId": "undefined", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-no-undef", + "severity": 2, + }, + { + "column": 11, + "endColumn": 18, + "endLine": 1, + "fix": { + "range": [ + 10, + 17, + ], + "text": ""foo"", + }, + "line": 1, + "message": "Curly braces are unnecessary here.", + "messageId": "unnecessaryCurly", + "nodeType": "JSXExpressionContainer", + "ruleId": "react/jsx-curly-brace-presence", + "severity": 2, + }, +] +`; + +exports[`fixtures should match all snapshots: 437.mdx 2`] = ` +"bar +" +`; + exports[`fixtures should match all snapshots: 445.mdx 1`] = ` [ + { + "column": 1, + "endColumn": 8, + "endLine": 9, + "fix": { + "range": [ + 178, + 187, + ], + "text": " />", + }, + "line": 9, + "message": "Empty components are self-closing", + "messageId": "notSelfClosing", + "nodeType": "JSXOpeningElement", + "ruleId": "react/self-closing-comp", + "severity": 2, + }, { "column": 2, "endColumn": 3, @@ -696,6 +1517,19 @@ exports[`fixtures should match all snapshots: 445.mdx 1`] = ` ] `; +exports[`fixtures should match all snapshots: 445.mdx 2`] = ` +"import { DefinitionList } from './DefinitionList' + + + Hello World ! + + + + + +" +`; + exports[`fixtures should match all snapshots: 450.mdx 1`] = ` [ { @@ -716,6 +1550,66 @@ exports[`fixtures should match all snapshots: 450.mdx 1`] = ` "ruleId": "prettier/prettier", "severity": 2, }, + { + "column": 3, + "endColumn": 6, + "endLine": 11, + "fix": { + "range": [ + 114, + 414, + ], + "text": "alt="" + aria-disabled + className="my-image" + height={250} + + loading="eager" + onClick={() => console.log('onClick')} + onError={() => console.log('onError')} + onLoad={() => console.log('onLoad')} + src="https://via.placeholder.com/250x250" + style={{ display: 'block' }} + title="" + width={250}", + }, + "line": 11, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, + { + "column": 3, + "endColumn": 16, + "endLine": 13, + "fix": { + "range": [ + 114, + 414, + ], + "text": "alt="" + aria-disabled + className="my-image" + height={250} + + loading="eager" + onClick={() => console.log('onClick')} + onError={() => console.log('onError')} + onLoad={() => console.log('onLoad')} + src="https://via.placeholder.com/250x250" + style={{ display: 'block' }} + title="" + width={250}", + }, + "line": 13, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, { "column": 1, "endColumn": 3, @@ -734,6 +1628,36 @@ exports[`fixtures should match all snapshots: 450.mdx 1`] = ` "ruleId": "prettier/prettier", "severity": 2, }, + { + "column": 3, + "endColumn": 12, + "endLine": 15, + "fix": { + "range": [ + 114, + 414, + ], + "text": "alt="" + aria-disabled + className="my-image" + height={250} + + loading="eager" + onClick={() => console.log('onClick')} + onError={() => console.log('onError')} + onLoad={() => console.log('onLoad')} + src="https://via.placeholder.com/250x250" + style={{ display: 'block' }} + title="" + width={250}", + }, + "line": 15, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, { "column": 1, "endColumn": 3, @@ -770,6 +1694,36 @@ exports[`fixtures should match all snapshots: 450.mdx 1`] = ` "ruleId": "prettier/prettier", "severity": 2, }, + { + "column": 3, + "endColumn": 9, + "endLine": 17, + "fix": { + "range": [ + 114, + 414, + ], + "text": "alt="" + aria-disabled + className="my-image" + height={250} + + loading="eager" + onClick={() => console.log('onClick')} + onError={() => console.log('onError')} + onLoad={() => console.log('onLoad')} + src="https://via.placeholder.com/250x250" + style={{ display: 'block' }} + title="" + width={250}", + }, + "line": 17, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, { "column": 1, "endColumn": 3, @@ -788,6 +1742,36 @@ exports[`fixtures should match all snapshots: 450.mdx 1`] = ` "ruleId": "prettier/prettier", "severity": 2, }, + { + "column": 3, + "endColumn": 10, + "endLine": 18, + "fix": { + "range": [ + 114, + 414, + ], + "text": "alt="" + aria-disabled + className="my-image" + height={250} + + loading="eager" + onClick={() => console.log('onClick')} + onError={() => console.log('onError')} + onLoad={() => console.log('onLoad')} + src="https://via.placeholder.com/250x250" + style={{ display: 'block' }} + title="" + width={250}", + }, + "line": 18, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, { "column": 1, "endColumn": 3, @@ -806,6 +1790,36 @@ exports[`fixtures should match all snapshots: 450.mdx 1`] = ` "ruleId": "prettier/prettier", "severity": 2, }, + { + "column": 3, + "endColumn": 8, + "endLine": 19, + "fix": { + "range": [ + 114, + 414, + ], + "text": "alt="" + aria-disabled + className="my-image" + height={250} + + loading="eager" + onClick={() => console.log('onClick')} + onError={() => console.log('onError')} + onLoad={() => console.log('onLoad')} + src="https://via.placeholder.com/250x250" + style={{ display: 'block' }} + title="" + width={250}", + }, + "line": 19, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, { "column": 1, "endColumn": 3, @@ -824,6 +1838,36 @@ exports[`fixtures should match all snapshots: 450.mdx 1`] = ` "ruleId": "prettier/prettier", "severity": 2, }, + { + "column": 3, + "endColumn": 9, + "endLine": 20, + "fix": { + "range": [ + 114, + 414, + ], + "text": "alt="" + aria-disabled + className="my-image" + height={250} + + loading="eager" + onClick={() => console.log('onClick')} + onError={() => console.log('onError')} + onLoad={() => console.log('onLoad')} + src="https://via.placeholder.com/250x250" + style={{ display: 'block' }} + title="" + width={250}", + }, + "line": 20, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, { "column": 1, "endColumn": 3, @@ -842,6 +1886,36 @@ exports[`fixtures should match all snapshots: 450.mdx 1`] = ` "ruleId": "prettier/prettier", "severity": 2, }, + { + "column": 3, + "endColumn": 10, + "endLine": 21, + "fix": { + "range": [ + 114, + 414, + ], + "text": "alt="" + aria-disabled + className="my-image" + height={250} + + loading="eager" + onClick={() => console.log('onClick')} + onError={() => console.log('onError')} + onLoad={() => console.log('onLoad')} + src="https://via.placeholder.com/250x250" + style={{ display: 'block' }} + title="" + width={250}", + }, + "line": 21, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, { "column": 1, "endColumn": 3, @@ -860,9 +1934,137 @@ exports[`fixtures should match all snapshots: 450.mdx 1`] = ` "ruleId": "prettier/prettier", "severity": 2, }, + { + "column": 3, + "endColumn": 10, + "endLine": 22, + "fix": { + "range": [ + 114, + 414, + ], + "text": "alt="" + aria-disabled + className="my-image" + height={250} + + loading="eager" + onClick={() => console.log('onClick')} + onError={() => console.log('onError')} + onLoad={() => console.log('onLoad')} + src="https://via.placeholder.com/250x250" + style={{ display: 'block' }} + title="" + width={250}", + }, + "line": 22, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, +] +`; + +exports[`fixtures should match all snapshots: 450.mdx 2`] = ` +"import { Meta } from '@storybook/addon-docs' + + + +# Test + +Lorem ipsum dolor sit amet. + + console.log('onClick')} +onError={() => console.log('onError')} +onLoad={() => console.log('onLoad')} +src="https://via.placeholder.com/250x250" +style={{ display: 'block' }} +title="" +width={250} +/> +" +`; + +exports[`fixtures should match all snapshots: 488.mdx 1`] = ` +[ + { + "column": 2, + "endColumn": 7, + "endLine": 1, + "line": 1, + "message": "'Image' is not defined.", + "messageId": "undefined", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-no-undef", + "severity": 2, + }, + { + "column": 3, + "endColumn": 9, + "endLine": 5, + "fix": { + "range": [ + 9, + 74, + ], + "text": "alt="alt" + format="svg" + height="100" + src="src" + width="315"", + }, + "line": 5, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, + { + "column": 3, + "endColumn": 9, + "endLine": 6, + "fix": { + "range": [ + 9, + 74, + ], + "text": "alt="alt" + format="svg" + height="100" + src="src" + width="315"", + }, + "line": 6, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, ] `; +exports[`fixtures should match all snapshots: 488.mdx 2`] = ` +"alt +" +`; + exports[`fixtures should match all snapshots: acorn.mdx 1`] = ` [ { @@ -877,6 +2079,8 @@ exports[`fixtures should match all snapshots: acorn.mdx 1`] = ` ] `; +exports[`fixtures should match all snapshots: acorn.mdx 2`] = `undefined`; + exports[`fixtures should match all snapshots: adjacent.mdx 1`] = ` [ { @@ -900,6 +2104,13 @@ exports[`fixtures should match all snapshots: adjacent.mdx 1`] = ` ] `; +exports[`fixtures should match all snapshots: adjacent.mdx 2`] = ` +"import Basic from './basic' + + +" +`; + exports[`fixtures should match all snapshots: basic.mdx 1`] = ` [ { @@ -923,6 +2134,33 @@ exports[`fixtures should match all snapshots: basic.mdx 1`] = ` ] `; +exports[`fixtures should match all snapshots: basic.mdx 2`] = ` +"import Basic from './basic' + +export const meta = { + title: 'Blog Post', +} + +# Blog Post + +Lorem ipsum dolor sit amet, consectetur adipiscing **elit**. Ut ac lobortis velit. + +{/* This is a comment */} + +\`\`\`css +@media (min-width: 400px) { + border-color: #000; +} +\`\`\` + +{/* This is a comment */} + +## Subtitle + +Lorem ipsum dolor sit _amet_, consectetur adipiscing elit. Ut ac lobortis velit. +" +`; + exports[`fixtures should match all snapshots: basic.tsx 1`] = `[]`; exports[`fixtures should match all snapshots: blank-lines.mdx 1`] = ` @@ -945,6 +2183,29 @@ exports[`fixtures should match all snapshots: blank-lines.mdx 1`] = ` "ruleId": "prettier/prettier", "severity": 2, }, + { + "column": 3, + "endColumn": 5, + "endLine": 10, + "fix": { + "range": [ + 163, + 250, + ], + "text": "bg='lightgray' + p={3} + style={{ + textAlign: 'center', + fontWeight: 'bold', + }}", + }, + "line": 10, + "message": "Props should be sorted alphabetically", + "messageId": "sortPropsByAlpha", + "nodeType": "JSXIdentifier", + "ruleId": "react/jsx-sort-props", + "severity": 2, + }, { "column": 1, "endColumn": 16, @@ -1045,6 +2306,42 @@ Here's a YouTube shortcode: ] `; +exports[`fixtures should match all snapshots: blank-lines.mdx 2`] = ` +"import { Box } from '@rebass/emotion' + +# Getting Started + +If you have an existing project you want to integrate MDX with, check out +the installation guides. + + + [Next.js](/getting-started/next) | [Gatsby](/getting-started/gatsby) | [Create + React App](/getting-started/create-react-app) | [React + Static](/getting-started/react-static) | [Webpack](/getting-started/webpack) | + [Parcel](/getting-started/parcel) | [Zero](/getting-started/zero) + + +# Hello, world! + +Here's a Twitter shortcode: + + + +# Here's a text gradient shortcode! + +Here's a YouTube shortcode: + + +" +`; + exports[`fixtures should match all snapshots: code-blocks.md 1`] = ` [ { @@ -1136,6 +2433,59 @@ import React from 'react' ] `; +exports[`fixtures should match all snapshots: code-blocks.md 2`] = ` +"# abc + +# abc + +
Hello World!
+ + + +\`\`\`JavaScript +export var a = 1 == 2 + +export const b = [].concat(a) +\`\`\` + + export var a = 1 == 2 + +\`\`\`log +This is not parsable as JavaScript! +\`\`\` + + + +\`\`\`jsx +export const App = () =>
2 > 1
+\`\`\` + + + +\`\`\`TypeScript +export type Value = 1 | 2 | 3 | 4 | 5 +\`\`\` + +\`\`\`MarkDown +# abc + +# abc +\`\`\` + + + +\`\`\`mdx +import React from 'react' + +
Header
+ +# abc + +# abc +\`\`\` +" +`; + exports[`fixtures should match all snapshots: code-blocks.mdx 1`] = `[]`; exports[`fixtures should match all snapshots: comments.mdx 1`] = ` @@ -1152,6 +2502,8 @@ exports[`fixtures should match all snapshots: comments.mdx 1`] = ` ] `; +exports[`fixtures should match all snapshots: comments.mdx 2`] = `undefined`; + exports[`fixtures should match all snapshots: details.mdx 1`] = ` [ { @@ -1166,6 +2518,8 @@ exports[`fixtures should match all snapshots: details.mdx 1`] = ` ] `; +exports[`fixtures should match all snapshots: details.mdx 2`] = `undefined`; + exports[`fixtures should match all snapshots: jsx-in-list.mdx 1`] = ` [ { @@ -1191,7 +2545,7 @@ exports[`fixtures should match all snapshots: jsx-in-list.mdx 1`] = ` }, { "column": 46, - "endColumn": 51, + "endColumn": 58, "endLine": 1, "line": 1, "message": "Unknown property 'story' found", @@ -1223,7 +2577,7 @@ exports[`fixtures should match all snapshots: jsx-in-list.mdx 1`] = ` }, { "column": 46, - "endColumn": 51, + "endColumn": 58, "endLine": 5, "line": 5, "message": "Unknown property 'story' found", @@ -1255,7 +2609,7 @@ exports[`fixtures should match all snapshots: jsx-in-list.mdx 1`] = ` }, { "column": 46, - "endColumn": 51, + "endColumn": 58, "endLine": 9, "line": 9, "message": "Unknown property 'story' found", @@ -1287,7 +2641,7 @@ exports[`fixtures should match all snapshots: jsx-in-list.mdx 1`] = ` }, { "column": 46, - "endColumn": 51, + "endColumn": 58, "endLine": 13, "line": 13, "message": "Unknown property 'story' found", @@ -1319,7 +2673,7 @@ exports[`fixtures should match all snapshots: jsx-in-list.mdx 1`] = ` }, { "column": 46, - "endColumn": 51, + "endColumn": 58, "endLine": 17, "line": 17, "message": "Unknown property 'story' found", @@ -1351,7 +2705,7 @@ exports[`fixtures should match all snapshots: jsx-in-list.mdx 1`] = ` }, { "column": 46, - "endColumn": 51, + "endColumn": 58, "endLine": 21, "line": 21, "message": "Unknown property 'story' found", @@ -1363,13 +2717,82 @@ exports[`fixtures should match all snapshots: jsx-in-list.mdx 1`] = ` ] `; +exports[`fixtures should match all snapshots: jsx-in-list.mdx 2`] = ` +"- -
+ Vuetify preset +
+ : some extra text describing the preset + -
+ Vuetify preset +
+ : some extra text describing the preset + -
+ Vuetify preset +
+ : some extra text describing the preset +- -
+ Vuetify preset +
+ : some extra text describing the preset + -
+ Vuetify preset +
+ : some extra text describing the preset + -
+ Vuetify preset +
+ : some extra text describing the preset +" +`; + exports[`fixtures should match all snapshots: leading-spaces.mdx 1`] = `[]`; exports[`fixtures should match all snapshots: markdown.md 1`] = `[]`; exports[`fixtures should match all snapshots: nested.md 1`] = `[]`; -exports[`fixtures should match all snapshots: no-unescaped-entities.mdx 1`] = `[]`; +exports[`fixtures should match all snapshots: no-unescaped-entities.mdx 1`] = ` +[ + { + "column": 8, + "line": 2, + "message": "\`>\` can be escaped with \`>\`.", + "messageId": "unescapedEntityAlts", + "nodeType": "JSXText", + "ruleId": "react/no-unescaped-entities", + "severity": 2, + }, + { + "column": 13, + "line": 5, + "message": "\`>\` can be escaped with \`>\`.", + "messageId": "unescapedEntityAlts", + "nodeType": "JSXText", + "ruleId": "react/no-unescaped-entities", + "severity": 2, + }, +] +`; + +exports[`fixtures should match all snapshots: no-unescaped-entities.mdx 2`] = `undefined`; exports[`fixtures should match all snapshots: no-unused-expressions.mdx 1`] = ` [ @@ -1387,6 +2810,8 @@ exports[`fixtures should match all snapshots: no-unused-expressions.mdx 1`] = ` ] `; +exports[`fixtures should match all snapshots: no-unused-expressions.mdx 2`] = `undefined`; + exports[`fixtures should match all snapshots: processor.mdx 1`] = ` [ { @@ -1412,6 +2837,8 @@ exports[`fixtures should match all snapshots: processor.mdx 1`] = ` ] `; +exports[`fixtures should match all snapshots: processor.mdx 2`] = `undefined`; + exports[`fixtures should match all snapshots: remark.md 1`] = `[]`; exports[`fixtures should match all snapshots: remark.mdx 1`] = `[]`; @@ -1446,6 +2873,10 @@ exports[`fixtures should match all snapshots: test.md 2`] = ` ] `; +exports[`fixtures should match all snapshots: test.md 3`] = `undefined`; + +exports[`fixtures should match all snapshots: test.md 4`] = `undefined`; + exports[`fixtures should match all snapshots: unicorn.jsx 1`] = ` [ { @@ -1496,6 +2927,20 @@ exports[`fixtures should match all snapshots: unicorn.jsx 1`] = ` ] `; +exports[`fixtures should match all snapshots: unicorn.jsx 2`] = ` +"; + {{ + template: /* HTML */ \` +
+
Nested
+ Hello World +
+ \`, + }} +
+" +`; + exports[`fixtures should match all snapshots: unicorn.mdx 1`] = ` [ { @@ -1534,3 +2979,17 @@ exports[`fixtures should match all snapshots: unicorn.mdx 1`] = ` }, ] `; + +exports[`fixtures should match all snapshots: unicorn.mdx 2`] = ` +" + {{ + template: /* HTML */ \` +
+
Nested
+ Hello World +
+ \`, + }} +
+" +`; diff --git a/test/__snapshots__/parser.test.ts.snap b/test/__snapshots__/parser.test.ts.snap index f76c8068..af05862c 100644 --- a/test/__snapshots__/parser.test.ts.snap +++ b/test/__snapshots__/parser.test.ts.snap @@ -6,7 +6,31 @@ exports[`parser should match all AST snapshots: 287.mdx 1`] = ` { "end": 111, "expression": { - "children": [], + "children": [ + { + "end": 107, + "loc": { + "end": { + "column": 107, + "line": 1, + "offset": 107, + }, + "start": { + "column": 95, + "line": 1, + "offset": 95, + }, + }, + "range": [ + 95, + 107, + ], + "raw": "announcement", + "start": 95, + "type": "JSXText", + "value": "announcement", + }, + ], "closingElement": { "end": 111, "loc": { @@ -68,12 +92,12 @@ exports[`parser should match all AST snapshots: 287.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 56, + "end": 94, "loc": { "end": { - "column": 56, + "column": 94, "line": 1, - "offset": 56, + "offset": 94, }, "start": { "column": 52, @@ -106,9 +130,9 @@ exports[`parser should match all AST snapshots: 287.mdx 1`] = ` }, "range": [ 52, - 56, + 94, ], - "raw": "href", + "raw": "href="/blog/2020-10-10-webpack-5-release/"", "start": 52, "type": "JSXAttribute", "value": { @@ -211,7 +235,31 @@ exports[`parser should match all AST snapshots: 287.mdx 1`] = ` { "end": 202, "expression": { - "children": [], + "children": [ + { + "end": 198, + "loc": { + "end": { + "column": 198, + "line": 1, + "offset": 198, + }, + "start": { + "column": 170, + "line": 1, + "offset": 170, + }, + }, + "range": [ + 170, + 198, + ], + "raw": "webpack 4 documentation here", + "start": 170, + "type": "JSXText", + "value": "webpack 4 documentation here", + }, + ], "closingElement": { "end": 202, "loc": { @@ -273,12 +321,12 @@ exports[`parser should match all AST snapshots: 287.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 140, + "end": 169, "loc": { "end": { - "column": 140, + "column": 169, "line": 1, - "offset": 140, + "offset": 169, }, "start": { "column": 136, @@ -311,9 +359,9 @@ exports[`parser should match all AST snapshots: 287.mdx 1`] = ` }, "range": [ 136, - 140, + 169, ], - "raw": "href", + "raw": "href="https://v4.webpack.js.org/"", "start": 136, "type": "JSXAttribute", "value": { @@ -952,7 +1000,31 @@ exports[`parser should match all AST snapshots: 292.mdx 1`] = ` { "end": 54, "expression": { - "children": [], + "children": [ + { + "end": 48, + "loc": { + "end": { + "column": 38, + "line": 3, + "offset": 48, + }, + "start": { + "column": 31, + "line": 3, + "offset": 41, + }, + }, + "range": [ + 41, + 48, + ], + "raw": "content", + "start": 41, + "type": "JSXText", + "value": "content", + }, + ], "closingElement": { "end": 54, "loc": { @@ -1014,12 +1086,12 @@ exports[`parser should match all AST snapshots: 292.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 34, + "end": 40, "loc": { "end": { - "column": 24, + "column": 30, "line": 3, - "offset": 34, + "offset": 40, }, "start": { "column": 15, @@ -1052,9 +1124,9 @@ exports[`parser should match all AST snapshots: 292.mdx 1`] = ` }, "range": [ 25, - 34, + 40, ], - "raw": "className", + "raw": "className="abc"", "start": 25, "type": "JSXAttribute", "value": { @@ -1157,7 +1229,31 @@ exports[`parser should match all AST snapshots: 292.mdx 1`] = ` { "end": 146, "expression": { - "children": [], + "children": [ + { + "end": 135, + "loc": { + "end": { + "column": 20, + "line": 6, + "offset": 135, + }, + "start": { + "column": 6, + "line": 6, + "offset": 121, + }, + }, + "range": [ + 121, + 135, + ], + "raw": "Vuetify preset", + "start": 121, + "type": "JSXText", + "value": "Vuetify preset", + }, + ], "closingElement": { "end": 146, "loc": { @@ -1219,12 +1315,12 @@ exports[`parser should match all AST snapshots: 292.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 69, + "end": 100, "loc": { "end": { - "column": 13, + "column": 44, "line": 5, - "offset": 69, + "offset": 100, }, "start": { "column": 9, @@ -1257,9 +1353,9 @@ exports[`parser should match all AST snapshots: 292.mdx 1`] = ` }, "range": [ 65, - 69, + 100, ], - "raw": "kind", + "raw": "kind="docs-packages-vuetify-preset"", "start": 65, "type": "JSXAttribute", "value": { @@ -1287,12 +1383,12 @@ exports[`parser should match all AST snapshots: 292.mdx 1`] = ` }, }, { - "end": 106, + "end": 113, "loc": { "end": { - "column": 50, + "column": 57, "line": 5, - "offset": 106, + "offset": 113, }, "start": { "column": 45, @@ -1325,9 +1421,9 @@ exports[`parser should match all AST snapshots: 292.mdx 1`] = ` }, "range": [ 101, - 106, + 113, ], - "raw": "story", + "raw": "story="page"", "start": 101, "type": "JSXAttribute", "value": { @@ -2522,7 +2618,286 @@ exports[`parser should match all AST snapshots: 367.mdx 1`] = ` { "end": 86, "expression": { - "children": [], + "children": [ + { + "children": [ + { + "end": 60, + "loc": { + "end": { + "column": 9, + "line": 8, + "offset": 60, + }, + "start": { + "column": 5, + "line": 8, + "offset": 56, + }, + }, + "range": [ + 56, + 60, + ], + "raw": "test", + "start": 56, + "type": "JSXText", + "value": "test", + }, + ], + "closingElement": { + "end": 64, + "loc": { + "end": { + "column": 13, + "line": 8, + "offset": 64, + }, + "start": { + "column": 9, + "line": 8, + "offset": 60, + }, + }, + "name": { + "end": 63, + "loc": { + "end": { + "column": 12, + "line": 8, + "offset": 63, + }, + "start": { + "column": 11, + "line": 8, + "offset": 62, + }, + }, + "name": "p", + "range": [ + 62, + 63, + ], + "raw": "p", + "start": 62, + "type": "JSXIdentifier", + }, + "range": [ + 60, + 64, + ], + "raw": "

", + "start": 60, + "type": "JSXClosingElement", + }, + "end": 64, + "loc": { + "end": { + "column": 13, + "line": 8, + "offset": 64, + }, + "start": { + "column": 2, + "line": 8, + "offset": 53, + }, + }, + "openingElement": { + "attributes": [], + "end": 56, + "loc": { + "end": { + "column": 5, + "line": 8, + "offset": 56, + }, + "start": { + "column": 2, + "line": 8, + "offset": 53, + }, + }, + "name": { + "end": 55, + "loc": { + "end": { + "column": 4, + "line": 8, + "offset": 55, + }, + "start": { + "column": 3, + "line": 8, + "offset": 54, + }, + }, + "name": "p", + "range": [ + 54, + 55, + ], + "raw": "p", + "start": 54, + "type": "JSXIdentifier", + }, + "range": [ + 53, + 56, + ], + "raw": "

", + "selfClosing": false, + "start": 53, + "type": "JSXOpeningElement", + }, + "range": [ + 53, + 64, + ], + "raw": "

test

", + "start": 53, + "type": "JSXElement", + }, + { + "children": [ + { + "end": 75, + "loc": { + "end": { + "column": 9, + "line": 10, + "offset": 75, + }, + "start": { + "column": 5, + "line": 10, + "offset": 71, + }, + }, + "range": [ + 71, + 75, + ], + "raw": "test", + "start": 71, + "type": "JSXText", + "value": "test", + }, + ], + "closingElement": { + "end": 79, + "loc": { + "end": { + "column": 13, + "line": 10, + "offset": 79, + }, + "start": { + "column": 9, + "line": 10, + "offset": 75, + }, + }, + "name": { + "end": 78, + "loc": { + "end": { + "column": 12, + "line": 10, + "offset": 78, + }, + "start": { + "column": 11, + "line": 10, + "offset": 77, + }, + }, + "name": "p", + "range": [ + 77, + 78, + ], + "raw": "p", + "start": 77, + "type": "JSXIdentifier", + }, + "range": [ + 75, + 79, + ], + "raw": "

", + "start": 75, + "type": "JSXClosingElement", + }, + "end": 79, + "loc": { + "end": { + "column": 13, + "line": 10, + "offset": 79, + }, + "start": { + "column": 2, + "line": 10, + "offset": 68, + }, + }, + "openingElement": { + "attributes": [], + "end": 71, + "loc": { + "end": { + "column": 5, + "line": 10, + "offset": 71, + }, + "start": { + "column": 2, + "line": 10, + "offset": 68, + }, + }, + "name": { + "end": 70, + "loc": { + "end": { + "column": 4, + "line": 10, + "offset": 70, + }, + "start": { + "column": 3, + "line": 10, + "offset": 69, + }, + }, + "name": "p", + "range": [ + 69, + 70, + ], + "raw": "p", + "start": 69, + "type": "JSXIdentifier", + }, + "range": [ + 68, + 71, + ], + "raw": "

", + "selfClosing": false, + "start": 68, + "type": "JSXOpeningElement", + }, + "range": [ + 68, + 79, + ], + "raw": "

test

", + "start": 68, + "type": "JSXElement", + }, + ], "closingElement": { "end": 86, "loc": { @@ -2659,278 +3034,6 @@ exports[`parser should match all AST snapshots: 367.mdx 1`] = ` "start": 45, "type": "ExpressionStatement", }, - { - "end": 64, - "expression": { - "children": [], - "closingElement": { - "end": 64, - "loc": { - "end": { - "column": 13, - "line": 8, - "offset": 64, - }, - "start": { - "column": 9, - "line": 8, - "offset": 60, - }, - }, - "name": { - "end": 63, - "loc": { - "end": { - "column": 12, - "line": 8, - "offset": 63, - }, - "start": { - "column": 11, - "line": 8, - "offset": 62, - }, - }, - "name": "p", - "range": [ - 62, - 63, - ], - "raw": "p", - "start": 62, - "type": "JSXIdentifier", - }, - "range": [ - 60, - 64, - ], - "raw": "

", - "start": 60, - "type": "JSXClosingElement", - }, - "end": 64, - "loc": { - "end": { - "column": 13, - "line": 8, - "offset": 64, - }, - "start": { - "column": 2, - "line": 8, - "offset": 53, - }, - }, - "openingElement": { - "attributes": [], - "end": 56, - "loc": { - "end": { - "column": 5, - "line": 8, - "offset": 56, - }, - "start": { - "column": 2, - "line": 8, - "offset": 53, - }, - }, - "name": { - "end": 55, - "loc": { - "end": { - "column": 4, - "line": 8, - "offset": 55, - }, - "start": { - "column": 3, - "line": 8, - "offset": 54, - }, - }, - "name": "p", - "range": [ - 54, - 55, - ], - "raw": "p", - "start": 54, - "type": "JSXIdentifier", - }, - "range": [ - 53, - 56, - ], - "raw": "

", - "selfClosing": false, - "start": 53, - "type": "JSXOpeningElement", - }, - "range": [ - 53, - 64, - ], - "raw": "

test

", - "start": 53, - "type": "JSXElement", - }, - "loc": { - "end": { - "column": 14, - "line": 8, - "offset": 64, - }, - "start": { - "column": 3, - "line": 8, - "offset": 53, - }, - }, - "range": [ - 53, - 64, - ], - "start": 53, - "type": "ExpressionStatement", - }, - { - "end": 79, - "expression": { - "children": [], - "closingElement": { - "end": 79, - "loc": { - "end": { - "column": 13, - "line": 10, - "offset": 79, - }, - "start": { - "column": 9, - "line": 10, - "offset": 75, - }, - }, - "name": { - "end": 78, - "loc": { - "end": { - "column": 12, - "line": 10, - "offset": 78, - }, - "start": { - "column": 11, - "line": 10, - "offset": 77, - }, - }, - "name": "p", - "range": [ - 77, - 78, - ], - "raw": "p", - "start": 77, - "type": "JSXIdentifier", - }, - "range": [ - 75, - 79, - ], - "raw": "

", - "start": 75, - "type": "JSXClosingElement", - }, - "end": 79, - "loc": { - "end": { - "column": 13, - "line": 10, - "offset": 79, - }, - "start": { - "column": 2, - "line": 10, - "offset": 68, - }, - }, - "openingElement": { - "attributes": [], - "end": 71, - "loc": { - "end": { - "column": 5, - "line": 10, - "offset": 71, - }, - "start": { - "column": 2, - "line": 10, - "offset": 68, - }, - }, - "name": { - "end": 70, - "loc": { - "end": { - "column": 4, - "line": 10, - "offset": 70, - }, - "start": { - "column": 3, - "line": 10, - "offset": 69, - }, - }, - "name": "p", - "range": [ - 69, - 70, - ], - "raw": "p", - "start": 69, - "type": "JSXIdentifier", - }, - "range": [ - 68, - 71, - ], - "raw": "

", - "selfClosing": false, - "start": 68, - "type": "JSXOpeningElement", - }, - "range": [ - 68, - 79, - ], - "raw": "

test

", - "start": 68, - "type": "JSXElement", - }, - "loc": { - "end": { - "column": 14, - "line": 10, - "offset": 79, - }, - "start": { - "column": 3, - "line": 10, - "offset": 68, - }, - }, - "range": [ - 68, - 79, - ], - "start": 68, - "type": "ExpressionStatement", - }, ], "comments": [], "end": 87, @@ -3404,7 +3507,39 @@ exports[`parser should match all AST snapshots: 371.mdx 1`] = ` { "end": 74, "expression": { - "children": [], + "children": [ + { + "end": 66, + "lang": "js", + "loc": { + "end": { + "column": 3, + "line": 9, + "offset": 66, + }, + "start": { + "column": 0, + "line": 5, + "offset": 24, + }, + }, + "meta": null, + "range": [ + 24, + 66, + ], + "raw": "\`\`\`js +function foo() { + return 123; +} +\`\`\`", + "start": 24, + "type": "MDXCode", + "value": "function foo() { + return 123; +}", + }, + ], "closingElement": { "end": 74, "loc": { @@ -5001,12 +5136,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 431, + "end": 438, "loc": { "end": { - "column": 7, + "column": 14, "line": 20, - "offset": 431, + "offset": 438, }, "start": { "column": 2, @@ -5039,9 +5174,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 426, - 431, + 438, ], - "raw": "title", + "raw": "title="Tabs"", "start": 426, "type": "JSXAttribute", "value": { @@ -5069,12 +5204,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, }, { - "end": 451, + "end": 720, "loc": { "end": { - "column": 12, - "line": 21, - "offset": 451, + "column": 4, + "line": 34, + "offset": 720, }, "start": { "column": 2, @@ -5107,9 +5242,22 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 441, - 451, + 720, ], - "raw": "decorators", + "raw": "decorators={[ + moduleMetadata({ + imports: [ + ButtonModule, + IconModule, + FormsModule, + FormModule, + RadioModule, + TabsModule, + CardModule, + ], + declarations: [ActiveTestComponent, LazyTestComponent], + }), + ]}", "start": 441, "type": "JSXAttribute", "value": { @@ -6053,12 +6201,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 828, + "end": 836, "loc": { "end": { - "column": 8, + "column": 16, "line": 45, - "offset": 828, + "offset": 836, }, "start": { "column": 4, @@ -6091,9 +6239,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 824, - 828, + 836, ], - "raw": "name", + "raw": "name="Basic"", "start": 824, "type": "JSXAttribute", "value": { @@ -6121,12 +6269,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, }, { - "end": 847, + "end": 855, "loc": { "end": { - "column": 10, + "column": 18, "line": 46, - "offset": 847, + "offset": 855, }, "start": { "column": 4, @@ -6159,9 +6307,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 841, - 847, + 855, ], - "raw": "height", + "raw": "height="100px"", "start": 841, "type": "JSXAttribute", "value": { @@ -6826,12 +6974,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 1503, + "end": 1510, "loc": { "end": { - "column": 8, + "column": 15, "line": 82, - "offset": 1503, + "offset": 1510, }, "start": { "column": 4, @@ -6864,9 +7012,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 1499, - 1503, + 1510, ], - "raw": "name", + "raw": "name="Card"", "start": 1499, "type": "JSXAttribute", "value": { @@ -6894,12 +7042,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, }, { - "end": 1521, + "end": 1529, "loc": { "end": { - "column": 10, + "column": 18, "line": 83, - "offset": 1521, + "offset": 1529, }, "start": { "column": 4, @@ -6932,9 +7080,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 1515, - 1521, + 1529, ], - "raw": "height", + "raw": "height="200px"", "start": 1515, "type": "JSXAttribute", "value": { @@ -7593,12 +7741,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 1986, + "end": 1993, "loc": { "end": { - "column": 8, + "column": 15, "line": 104, - "offset": 1986, + "offset": 1993, }, "start": { "column": 4, @@ -7631,9 +7779,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 1982, - 1986, + 1993, ], - "raw": "name", + "raw": "name="Size"", "start": 1982, "type": "JSXAttribute", "value": { @@ -7661,12 +7809,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, }, { - "end": 2004, + "end": 2012, "loc": { "end": { - "column": 10, + "column": 18, "line": 105, - "offset": 2004, + "offset": 2012, }, "start": { "column": 4, @@ -7699,9 +7847,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 1998, - 2004, + 2012, ], - "raw": "height", + "raw": "height="200px"", "start": 1998, "type": "JSXAttribute", "value": { @@ -8567,12 +8715,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 2924, + "end": 2938, "loc": { "end": { - "column": 8, + "column": 22, "line": 138, - "offset": 2924, + "offset": 2938, }, "start": { "column": 4, @@ -8605,9 +8753,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 2920, - 2924, + 2938, ], - "raw": "name", + "raw": "name="CustomLabel"", "start": 2920, "type": "JSXAttribute", "value": { @@ -8635,12 +8783,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, }, { - "end": 2949, + "end": 2957, "loc": { "end": { - "column": 10, + "column": 18, "line": 139, - "offset": 2949, + "offset": 2957, }, "start": { "column": 4, @@ -8673,9 +8821,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 2943, - 2949, + 2957, ], - "raw": "height", + "raw": "height="200px"", "start": 2943, "type": "JSXAttribute", "value": { @@ -10837,12 +10985,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 3754, + "end": 3765, "loc": { "end": { - "column": 8, + "column": 19, "line": 173, - "offset": 3754, + "offset": 3765, }, "start": { "column": 4, @@ -10875,9 +11023,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 3750, - 3754, + 3765, ], - "raw": "name", + "raw": "name="Editable"", "start": 3750, "type": "JSXAttribute", "value": { @@ -10905,12 +11053,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, }, { - "end": 3776, + "end": 3784, "loc": { "end": { - "column": 10, + "column": 18, "line": 174, - "offset": 3776, + "offset": 3784, }, "start": { "column": 4, @@ -10943,9 +11091,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 3770, - 3776, + 3784, ], - "raw": "height", + "raw": "height="100px"", "start": 3770, "type": "JSXAttribute", "value": { @@ -11831,12 +11979,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 4792, + "end": 4803, "loc": { "end": { - "column": 8, + "column": 19, "line": 219, - "offset": 4792, + "offset": 4803, }, "start": { "column": 4, @@ -11869,9 +12017,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 4788, - 4792, + 4803, ], - "raw": "name", + "raw": "name="Disabled"", "start": 4788, "type": "JSXAttribute", "value": { @@ -11899,12 +12047,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, }, { - "end": 4814, + "end": 4822, "loc": { "end": { - "column": 10, + "column": 18, "line": 220, - "offset": 4814, + "offset": 4822, }, "start": { "column": 4, @@ -11937,9 +12085,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 4808, - 4814, + 4822, ], - "raw": "height", + "raw": "height="100px"", "start": 4808, "type": "JSXAttribute", "value": { @@ -12893,12 +13041,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 5585, + "end": 5592, "loc": { "end": { - "column": 8, + "column": 15, "line": 252, - "offset": 5585, + "offset": 5592, }, "start": { "column": 4, @@ -12931,9 +13079,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 5581, - 5585, + 5592, ], - "raw": "name", + "raw": "name="Lazy"", "start": 5581, "type": "JSXAttribute", "value": { @@ -12961,12 +13109,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, }, { - "end": 5603, + "end": 5611, "loc": { "end": { - "column": 10, + "column": 18, "line": 253, - "offset": 5603, + "offset": 5611, }, "start": { "column": 4, @@ -12999,9 +13147,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 5597, - 5603, + 5611, ], - "raw": "height", + "raw": "height="150px"", "start": 5597, "type": "JSXAttribute", "value": { @@ -13694,12 +13842,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 6796, + "end": 6803, "loc": { "end": { - "column": 8, + "column": 15, "line": 298, - "offset": 6796, + "offset": 6803, }, "start": { "column": 4, @@ -13732,9 +13880,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 6792, - 6796, + 6803, ], - "raw": "name", + "raw": "name="Nest"", "start": 6792, "type": "JSXAttribute", "value": { @@ -13762,12 +13910,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, }, { - "end": 6814, + "end": 6822, "loc": { "end": { - "column": 10, + "column": 18, "line": 299, - "offset": 6814, + "offset": 6822, }, "start": { "column": 4, @@ -13800,9 +13948,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 6808, - 6814, + 6822, ], - "raw": "height", + "raw": "height="100px"", "start": 6808, "type": "JSXAttribute", "value": { @@ -14311,12 +14459,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 8237, + "end": 8245, "loc": { "end": { - "column": 8, + "column": 16, "line": 347, - "offset": 8237, + "offset": 8245, }, "start": { "column": 4, @@ -14349,9 +14497,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 8233, - 8237, + 8245, ], - "raw": "name", + "raw": "name="Title"", "start": 8233, "type": "JSXAttribute", "value": { @@ -14379,12 +14527,12 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, }, { - "end": 8256, + "end": 8264, "loc": { "end": { - "column": 10, + "column": 18, "line": 348, - "offset": 8256, + "offset": 8264, }, "start": { "column": 4, @@ -14417,9 +14565,9 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` }, "range": [ 8250, - 8256, + 8264, ], - "raw": "height", + "raw": "height="100px"", "start": 8250, "type": "JSXAttribute", "value": { @@ -14692,50 +14840,6 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "type": "Block", "value": " HTML ", }, - { - "end": 893, - "loc": { - "end": { - "column": 26, - "line": 49, - "offset": 893, - }, - "start": { - "column": 16, - "line": 49, - "offset": 883, - }, - }, - "range": [ - 883, - 893, - ], - "start": 883, - "type": "Block", - "value": " HTML ", - }, - { - "end": 1567, - "loc": { - "end": { - "column": 26, - "line": 86, - "offset": 1567, - }, - "start": { - "column": 16, - "line": 86, - "offset": 1557, - }, - }, - "range": [ - 1557, - 1567, - ], - "start": 1557, - "type": "Block", - "value": " HTML ", - }, { "end": 1567, "loc": { @@ -14780,28 +14884,6 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "type": "Block", "value": " HTML ", }, - { - "end": 2050, - "loc": { - "end": { - "column": 26, - "line": 108, - "offset": 2050, - }, - "start": { - "column": 16, - "line": 108, - "offset": 2040, - }, - }, - "range": [ - 2040, - 2050, - ], - "start": 2040, - "type": "Block", - "value": " HTML ", - }, { "end": 2995, "loc": { @@ -14824,50 +14906,6 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "type": "Block", "value": " HTML ", }, - { - "end": 2995, - "loc": { - "end": { - "column": 26, - "line": 142, - "offset": 2995, - }, - "start": { - "column": 16, - "line": 142, - "offset": 2985, - }, - }, - "range": [ - 2985, - 2995, - ], - "start": 2985, - "type": "Block", - "value": " HTML ", - }, - { - "end": 3822, - "loc": { - "end": { - "column": 26, - "line": 177, - "offset": 3822, - }, - "start": { - "column": 16, - "line": 177, - "offset": 3812, - }, - }, - "range": [ - 3812, - 3822, - ], - "start": 3812, - "type": "Block", - "value": " HTML ", - }, { "end": 3822, "loc": { @@ -14912,28 +14950,6 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "type": "Block", "value": " HTML ", }, - { - "end": 4860, - "loc": { - "end": { - "column": 26, - "line": 223, - "offset": 4860, - }, - "start": { - "column": 16, - "line": 223, - "offset": 4850, - }, - }, - "range": [ - 4850, - 4860, - ], - "start": 4850, - "type": "Block", - "value": " HTML ", - }, { "end": 5649, "loc": { @@ -14956,50 +14972,6 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "type": "Block", "value": " HTML ", }, - { - "end": 5649, - "loc": { - "end": { - "column": 26, - "line": 256, - "offset": 5649, - }, - "start": { - "column": 16, - "line": 256, - "offset": 5639, - }, - }, - "range": [ - 5639, - 5649, - ], - "start": 5639, - "type": "Block", - "value": " HTML ", - }, - { - "end": 6860, - "loc": { - "end": { - "column": 26, - "line": 302, - "offset": 6860, - }, - "start": { - "column": 16, - "line": 302, - "offset": 6850, - }, - }, - "range": [ - 6850, - 6860, - ], - "start": 6850, - "type": "Block", - "value": " HTML ", - }, { "end": 6860, "loc": { @@ -15044,28 +15016,6 @@ exports[`parser should match all AST snapshots: 380.mdx 1`] = ` "type": "Block", "value": " HTML ", }, - { - "end": 8302, - "loc": { - "end": { - "column": 26, - "line": 351, - "offset": 8302, - }, - "start": { - "column": 16, - "line": 351, - "offset": 8292, - }, - }, - "range": [ - 8292, - 8302, - ], - "start": 8292, - "type": "Block", - "value": " HTML ", - }, ], "end": 10515, "loc": { @@ -29467,7 +29417,31 @@ exports[`parser should match all AST snapshots: 429.mdx 1`] = ` { "end": 31, "expression": { - "children": [], + "children": [ + { + "end": 22, + "loc": { + "end": { + "column": 22, + "line": 1, + "offset": 22, + }, + "start": { + "column": 17, + "line": 1, + "offset": 17, + }, + }, + "range": [ + 17, + 22, + ], + "raw": "Hello", + "start": 17, + "type": "JSXText", + "value": "Hello", + }, + ], "closingElement": { "end": 31, "loc": { @@ -30105,7 +30079,31 @@ exports[`parser should match all AST snapshots: 435.mdx 1`] = ` { "end": 88, "expression": { - "children": [], + "children": [ + { + "end": 78, + "loc": { + "end": { + "column": 6, + "line": 7, + "offset": 78, + }, + "start": { + "column": 1, + "line": 7, + "offset": 73, + }, + }, + "range": [ + 73, + 78, + ], + "raw": "Hello", + "start": 73, + "type": "JSXText", + "value": "Hello", + }, + ], "closingElement": { "end": 88, "loc": { @@ -30167,12 +30165,12 @@ exports[`parser should match all AST snapshots: 435.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 14, + "end": 69, "loc": { "end": { - "column": 6, - "line": 2, - "offset": 14, + "column": 3, + "line": 5, + "offset": 69, }, "start": { "column": 1, @@ -30205,9 +30203,12 @@ exports[`parser should match all AST snapshots: 435.mdx 1`] = ` }, "range": [ 9, - 14, + 69, ], - "raw": "style", + "raw": "style={{ + background: 'red', + border: '1px solid red', + }}", "start": 9, "type": "JSXAttribute", "value": { @@ -30505,12 +30506,12 @@ exports[`parser should match all AST snapshots: 435.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 120, + "end": 130, "loc": { "end": { - "column": 20, - "line": 12, - "offset": 120, + "column": 6, + "line": 13, + "offset": 130, }, "start": { "column": 16, @@ -30543,9 +30544,10 @@ exports[`parser should match all AST snapshots: 435.mdx 1`] = ` }, "range": [ 116, - 120, + 130, ], - "raw": "data", + "raw": "data={\` + \`}", "start": 116, "type": "JSXAttribute", "value": { @@ -31409,532 +31411,1125 @@ exports[`parser should match all AST snapshots: 435.mdx 1`] = ` } `; -exports[`parser should match all AST snapshots: 445.mdx 1`] = ` +exports[`parser should match all AST snapshots: 437.mdx 1`] = ` { "body": [ { - "end": 49, - "loc": { - "end": { - "column": 49, - "line": 1, - "offset": 49, - }, - "start": { - "column": 0, - "line": 1, - "offset": 0, - }, - }, - "range": [ - 0, - 49, - ], - "source": { - "end": 49, - "loc": { - "end": { - "column": 49, - "line": 1, - "offset": 49, - }, - "start": { - "column": 31, - "line": 1, - "offset": 31, - }, - }, - "range": [ - 31, - 49, - ], - "raw": "'./DefinitionList'", - "start": 31, - "type": "Literal", - "value": "./DefinitionList", - }, - "specifiers": [ - { - "end": 23, - "imported": { - "end": 23, - "loc": { - "end": { - "column": 23, - "line": 1, - "offset": 23, - }, - "start": { - "column": 9, - "line": 1, - "offset": 9, + "end": 31, + "expression": { + "children": [ + { + "end": 31, + "expression": { + "end": 24, + "loc": { + "end": { + "column": 24, + "line": 1, + "offset": 24, + }, + "start": { + "column": 19, + "line": 1, + "offset": 19, + }, }, + "range": [ + 19, + 24, + ], + "raw": "'bar'", + "start": 19, + "type": "Literal", + "value": "bar", }, - "name": "DefinitionList", - "range": [ - 9, - 23, - ], - "start": 9, - "type": "Identifier", - }, - "loc": { - "end": { - "column": 23, - "line": 1, - "offset": 23, - }, - "start": { - "column": 9, - "line": 1, - "offset": 9, - }, - }, - "local": { - "end": 23, "loc": { "end": { - "column": 23, + "column": 31, "line": 1, - "offset": 23, + "offset": 31, }, "start": { - "column": 9, + "column": 0, "line": 1, - "offset": 9, + "offset": 0, }, }, - "name": "DefinitionList", "range": [ - 9, - 23, + 0, + 31, ], - "start": 9, - "type": "Identifier", + "raw": "{'bar'}", + "start": 0, + "type": "JSXExpressionContainer", }, - "range": [ - 9, - 23, - ], - "start": 9, - "type": "ImportSpecifier", - }, - ], - "start": 0, - "type": "ImportDeclaration", - }, - { - "end": 155, - "expression": { - "children": [], + ], "closingElement": { - "end": 155, + "end": 31, "loc": { "end": { - "column": 17, - "line": 5, - "offset": 155, + "column": 31, + "line": 1, + "offset": 31, }, "start": { - "column": 0, - "line": 5, - "offset": 138, + "column": 25, + "line": 1, + "offset": 25, }, }, "name": { - "end": 154, + "end": 30, "loc": { "end": { - "column": 16, - "line": 5, - "offset": 154, + "column": 30, + "line": 1, + "offset": 30, }, "start": { - "column": 2, - "line": 5, - "offset": 140, + "column": 27, + "line": 1, + "offset": 27, }, }, - "name": "DefinitionList", + "name": "App", "range": [ - 140, - 154, + 27, + 30, ], - "raw": "DefinitionList", - "start": 140, + "raw": "App", + "start": 27, "type": "JSXIdentifier", }, "range": [ - 138, - 155, + 25, + 31, ], - "raw": "", - "start": 138, + "raw": "", + "start": 25, "type": "JSXClosingElement", }, - "end": 155, + "end": 31, "loc": { "end": { - "column": 17, - "line": 5, - "offset": 155, + "column": 31, + "line": 1, + "offset": 31, }, "start": { "column": 0, - "line": 3, - "offset": 51, + "line": 1, + "offset": 0, }, }, "openingElement": { "attributes": [ { - "end": 75, + "end": 17, "loc": { "end": { - "column": 24, - "line": 3, - "offset": 75, + "column": 17, + "line": 1, + "offset": 17, }, "start": { - "column": 16, - "line": 3, - "offset": 67, + "column": 5, + "line": 1, + "offset": 5, }, }, "name": { - "end": 75, + "end": 9, "loc": { "end": { - "column": 24, - "line": 3, - "offset": 75, + "column": 9, + "line": 1, + "offset": 9, }, "start": { - "column": 16, - "line": 3, - "offset": 67, + "column": 5, + "line": 1, + "offset": 5, }, }, - "name": "disabled", + "name": "prop", "range": [ - 67, - 75, + 5, + 9, ], - "raw": "disabled", - "start": 67, + "raw": "prop", + "start": 5, "type": "JSXIdentifier", }, "range": [ - 67, - 75, + 5, + 17, ], - "raw": "disabled", - "start": 67, + "raw": "prop={'foo'}", + "start": 5, "type": "JSXAttribute", - "value": null, + "value": { + "end": 17, + "expression": { + "end": 16, + "loc": { + "end": { + "column": 16, + "line": 1, + "offset": 16, + }, + "start": { + "column": 11, + "line": 1, + "offset": 11, + }, + }, + "range": [ + 11, + 16, + ], + "raw": "'foo'", + "start": 11, + "type": "Literal", + "value": "foo", + }, + "loc": { + "end": { + "column": 17, + "line": 1, + "offset": 17, + }, + "start": { + "column": 10, + "line": 1, + "offset": 10, + }, + }, + "range": [ + 10, + 17, + ], + "raw": "{'foo'}", + "start": 10, + "type": "JSXExpressionContainer", + }, }, ], - "end": 76, + "end": 18, "loc": { "end": { - "column": 25, - "line": 3, - "offset": 76, + "column": 18, + "line": 1, + "offset": 18, }, "start": { "column": 0, - "line": 3, - "offset": 51, + "line": 1, + "offset": 0, }, }, "name": { - "end": 66, + "end": 4, "loc": { "end": { - "column": 15, - "line": 3, - "offset": 66, + "column": 4, + "line": 1, + "offset": 4, }, "start": { "column": 1, - "line": 3, - "offset": 52, + "line": 1, + "offset": 1, }, }, - "name": "DefinitionList", + "name": "App", "range": [ - 52, - 66, + 1, + 4, ], - "raw": "DefinitionList", - "start": 52, + "raw": "App", + "start": 1, "type": "JSXIdentifier", }, "range": [ - 51, - 76, + 0, + 18, ], - "raw": "", + "raw": "", "selfClosing": false, - "start": 51, + "start": 0, "type": "JSXOpeningElement", }, "range": [ - 51, - 155, + 0, + 31, ], - "raw": " - Hello World ! -", - "start": 51, + "raw": "{'bar'}", + "start": 0, "type": "JSXElement", }, "loc": { "end": { - "column": 18, - "line": 5, - "offset": 155, + "column": 32, + "line": 1, + "offset": 31, }, "start": { "column": 1, - "line": 3, - "offset": 51, + "line": 1, + "offset": 0, }, }, "range": [ - 51, - 155, + 0, + 31, ], - "start": 51, + "start": 0, "type": "ExpressionStatement", }, + ], + "comments": [], + "end": 32, + "loc": { + "end": { + "column": 1, + "line": 2, + "offset": 32, + }, + "start": { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "range": [ + 0, + 32, + ], + "sourceType": undefined, + "start": 0, + "tokens": [ { - "end": 137, - "expression": { - "children": [], - "closingElement": { - "end": 137, - "loc": { - "end": { - "column": 60, - "line": 4, - "offset": 137, - }, - "start": { - "column": 37, - "line": 4, - "offset": 114, - }, - }, - "name": { - "end": 136, - "loc": { - "end": { - "column": 59, - "line": 4, - "offset": 136, - }, - "start": { - "column": 39, - "line": 4, - "offset": 116, - }, - }, - "object": { - "end": 130, - "loc": { - "end": { - "column": 53, - "line": 4, - "offset": 130, - }, - "start": { - "column": 39, - "line": 4, - "offset": 116, - }, - }, - "name": "DefinitionList", - "range": [ - 116, - 130, - ], - "raw": "DefinitionList", - "start": 116, - "type": "JSXIdentifier", - }, - "property": { - "end": 136, - "loc": { - "end": { - "column": 59, - "line": 4, - "offset": 136, - }, - "start": { - "column": 54, - "line": 4, - "offset": 131, - }, - }, - "name": "Title", - "range": [ - 131, - 136, - ], - "raw": "Title", - "start": 131, - "type": "JSXIdentifier", - }, - "range": [ - 116, - 136, - ], - "raw": "DefinitionList.Title", - "start": 116, - "type": "JSXMemberExpression", - }, - "range": [ - 114, - 137, - ], - "raw": "", - "start": 114, - "type": "JSXClosingElement", - }, - "end": 137, - "loc": { - "end": { - "column": 60, - "line": 4, - "offset": 137, - }, - "start": { - "column": 2, - "line": 4, - "offset": 79, - }, - }, - "openingElement": { - "attributes": [], - "end": 101, - "loc": { - "end": { - "column": 24, - "line": 4, - "offset": 101, - }, - "start": { - "column": 2, - "line": 4, - "offset": 79, - }, - }, - "name": { - "end": 100, - "loc": { - "end": { - "column": 23, - "line": 4, - "offset": 100, - }, - "start": { - "column": 3, - "line": 4, - "offset": 80, - }, - }, - "object": { - "end": 94, - "loc": { - "end": { - "column": 17, - "line": 4, - "offset": 94, - }, - "start": { - "column": 3, - "line": 4, - "offset": 80, - }, - }, - "name": "DefinitionList", - "range": [ - 80, - 94, - ], - "raw": "DefinitionList", - "start": 80, - "type": "JSXIdentifier", - }, - "property": { - "end": 100, - "loc": { - "end": { - "column": 23, - "line": 4, - "offset": 100, - }, - "start": { - "column": 18, - "line": 4, - "offset": 95, - }, - }, - "name": "Title", - "range": [ - 95, - 100, - ], - "raw": "Title", - "start": 95, - "type": "JSXIdentifier", - }, - "range": [ - 80, - 100, - ], - "raw": "DefinitionList.Title", - "start": 80, - "type": "JSXMemberExpression", - }, - "range": [ - 79, - 101, - ], - "raw": "", - "selfClosing": false, - "start": 79, - "type": "JSXOpeningElement", - }, - "range": [ - 79, - 137, - ], - "raw": "Hello World !", - "start": 79, - "type": "JSXElement", - }, + "end": 1, "loc": { "end": { - "column": 61, - "line": 4, - "offset": 137, + "column": 1, + "line": 1, + "offset": 1, }, "start": { - "column": 3, - "line": 4, - "offset": 79, + "column": 0, + "line": 1, + "offset": 0, }, }, "range": [ - 79, - 137, + 0, + 1, ], - "start": 79, - "type": "ExpressionStatement", - }, - { + "start": 0, + "type": "Punctuator", + "value": "<", + }, + { + "end": 4, + "loc": { + "end": { + "column": 4, + "line": 1, + "offset": 4, + }, + "start": { + "column": 1, + "line": 1, + "offset": 1, + }, + }, + "range": [ + 1, + 4, + ], + "start": 1, + "type": "JSXIdentifier", + "value": "App", + }, + { + "end": 9, + "loc": { + "end": { + "column": 9, + "line": 1, + "offset": 9, + }, + "start": { + "column": 5, + "line": 1, + "offset": 5, + }, + }, + "range": [ + 5, + 9, + ], + "start": 5, + "type": "JSXIdentifier", + "value": "prop", + }, + { + "end": 10, + "loc": { + "end": { + "column": 10, + "line": 1, + "offset": 10, + }, + "start": { + "column": 9, + "line": 1, + "offset": 9, + }, + }, + "range": [ + 9, + 10, + ], + "start": 9, + "type": "Punctuator", + "value": "=", + }, + { + "end": 11, + "loc": { + "end": { + "column": 11, + "line": 1, + "offset": 11, + }, + "start": { + "column": 10, + "line": 1, + "offset": 10, + }, + }, + "range": [ + 10, + 11, + ], + "start": 10, + "type": "Punctuator", + "value": "{", + }, + { + "end": 16, + "loc": { + "end": { + "column": 16, + "line": 1, + "offset": 16, + }, + "start": { + "column": 11, + "line": 1, + "offset": 11, + }, + }, + "range": [ + 11, + 16, + ], + "start": 11, + "type": "String", + "value": "'foo'", + }, + { + "end": 16, + "loc": { + "end": { + "column": 16, + "line": 1, + "offset": 16, + }, + "start": { + "column": 11, + "line": 1, + "offset": 11, + }, + }, + "range": [ + 11, + 16, + ], + "start": 11, + "type": "String", + "value": "'foo'", + }, + { + "end": 17, + "loc": { + "end": { + "column": 17, + "line": 1, + "offset": 17, + }, + "start": { + "column": 16, + "line": 1, + "offset": 16, + }, + }, + "range": [ + 16, + 17, + ], + "start": 16, + "type": "Punctuator", + "value": "}", + }, + { + "end": 24, + "loc": { + "end": { + "column": 24, + "line": 1, + "offset": 24, + }, + "start": { + "column": 19, + "line": 1, + "offset": 19, + }, + }, + "range": [ + 19, + 24, + ], + "start": 19, + "type": "String", + "value": "'bar'", + }, + { + "end": 26, + "loc": { + "end": { + "column": 26, + "line": 1, + "offset": 26, + }, + "start": { + "column": 25, + "line": 1, + "offset": 25, + }, + }, + "range": [ + 25, + 26, + ], + "start": 25, + "type": "Punctuator", + "value": "<", + }, + { + "end": 27, + "loc": { + "end": { + "column": 27, + "line": 1, + "offset": 27, + }, + "start": { + "column": 26, + "line": 1, + "offset": 26, + }, + }, + "range": [ + 26, + 27, + ], + "start": 26, + "type": "Punctuator", + "value": "/", + }, + { + "end": 30, + "loc": { + "end": { + "column": 30, + "line": 1, + "offset": 30, + }, + "start": { + "column": 27, + "line": 1, + "offset": 27, + }, + }, + "range": [ + 27, + 30, + ], + "start": 27, + "type": "JSXIdentifier", + "value": "App", + }, + { + "end": 31, + "loc": { + "end": { + "column": 31, + "line": 1, + "offset": 31, + }, + "start": { + "column": 30, + "line": 1, + "offset": 30, + }, + }, + "range": [ + 30, + 31, + ], + "start": 30, + "type": "Punctuator", + "value": ">", + }, + ], + "type": "Program", +} +`; + +exports[`parser should match all AST snapshots: 445.mdx 1`] = ` +{ + "body": [ + { + "end": 49, + "loc": { + "end": { + "column": 49, + "line": 1, + "offset": 49, + }, + "start": { + "column": 0, + "line": 1, + "offset": 0, + }, + }, + "range": [ + 0, + 49, + ], + "source": { + "end": 49, + "loc": { + "end": { + "column": 49, + "line": 1, + "offset": 49, + }, + "start": { + "column": 31, + "line": 1, + "offset": 31, + }, + }, + "range": [ + 31, + 49, + ], + "raw": "'./DefinitionList'", + "start": 31, + "type": "Literal", + "value": "./DefinitionList", + }, + "specifiers": [ + { + "end": 23, + "imported": { + "end": 23, + "loc": { + "end": { + "column": 23, + "line": 1, + "offset": 23, + }, + "start": { + "column": 9, + "line": 1, + "offset": 9, + }, + }, + "name": "DefinitionList", + "range": [ + 9, + 23, + ], + "start": 9, + "type": "Identifier", + }, + "loc": { + "end": { + "column": 23, + "line": 1, + "offset": 23, + }, + "start": { + "column": 9, + "line": 1, + "offset": 9, + }, + }, + "local": { + "end": 23, + "loc": { + "end": { + "column": 23, + "line": 1, + "offset": 23, + }, + "start": { + "column": 9, + "line": 1, + "offset": 9, + }, + }, + "name": "DefinitionList", + "range": [ + 9, + 23, + ], + "start": 9, + "type": "Identifier", + }, + "range": [ + 9, + 23, + ], + "start": 9, + "type": "ImportSpecifier", + }, + ], + "start": 0, + "type": "ImportDeclaration", + }, + { + "end": 155, + "expression": { + "children": [ + { + "children": [ + { + "end": 114, + "loc": { + "end": { + "column": 37, + "line": 4, + "offset": 114, + }, + "start": { + "column": 24, + "line": 4, + "offset": 101, + }, + }, + "range": [ + 101, + 114, + ], + "raw": "Hello World !", + "start": 101, + "type": "JSXText", + "value": "Hello World !", + }, + ], + "closingElement": { + "end": 137, + "loc": { + "end": { + "column": 60, + "line": 4, + "offset": 137, + }, + "start": { + "column": 37, + "line": 4, + "offset": 114, + }, + }, + "name": { + "end": 136, + "loc": { + "end": { + "column": 59, + "line": 4, + "offset": 136, + }, + "start": { + "column": 39, + "line": 4, + "offset": 116, + }, + }, + "object": { + "end": 130, + "loc": { + "end": { + "column": 53, + "line": 4, + "offset": 130, + }, + "start": { + "column": 39, + "line": 4, + "offset": 116, + }, + }, + "name": "DefinitionList", + "range": [ + 116, + 130, + ], + "raw": "DefinitionList", + "start": 116, + "type": "JSXIdentifier", + }, + "property": { + "end": 136, + "loc": { + "end": { + "column": 59, + "line": 4, + "offset": 136, + }, + "start": { + "column": 54, + "line": 4, + "offset": 131, + }, + }, + "name": "Title", + "range": [ + 131, + 136, + ], + "raw": "Title", + "start": 131, + "type": "JSXIdentifier", + }, + "range": [ + 116, + 136, + ], + "raw": "DefinitionList.Title", + "start": 116, + "type": "JSXMemberExpression", + }, + "range": [ + 114, + 137, + ], + "raw": "", + "start": 114, + "type": "JSXClosingElement", + }, + "end": 137, + "loc": { + "end": { + "column": 60, + "line": 4, + "offset": 137, + }, + "start": { + "column": 2, + "line": 4, + "offset": 79, + }, + }, + "openingElement": { + "attributes": [], + "end": 101, + "loc": { + "end": { + "column": 24, + "line": 4, + "offset": 101, + }, + "start": { + "column": 2, + "line": 4, + "offset": 79, + }, + }, + "name": { + "end": 100, + "loc": { + "end": { + "column": 23, + "line": 4, + "offset": 100, + }, + "start": { + "column": 3, + "line": 4, + "offset": 80, + }, + }, + "object": { + "end": 94, + "loc": { + "end": { + "column": 17, + "line": 4, + "offset": 94, + }, + "start": { + "column": 3, + "line": 4, + "offset": 80, + }, + }, + "name": "DefinitionList", + "range": [ + 80, + 94, + ], + "raw": "DefinitionList", + "start": 80, + "type": "JSXIdentifier", + }, + "property": { + "end": 100, + "loc": { + "end": { + "column": 23, + "line": 4, + "offset": 100, + }, + "start": { + "column": 18, + "line": 4, + "offset": 95, + }, + }, + "name": "Title", + "range": [ + 95, + 100, + ], + "raw": "Title", + "start": 95, + "type": "JSXIdentifier", + }, + "range": [ + 80, + 100, + ], + "raw": "DefinitionList.Title", + "start": 80, + "type": "JSXMemberExpression", + }, + "range": [ + 79, + 101, + ], + "raw": "", + "selfClosing": false, + "start": 79, + "type": "JSXOpeningElement", + }, + "range": [ + 79, + 137, + ], + "raw": "Hello World !", + "start": 79, + "type": "JSXElement", + }, + ], + "closingElement": { + "end": 155, + "loc": { + "end": { + "column": 17, + "line": 5, + "offset": 155, + }, + "start": { + "column": 0, + "line": 5, + "offset": 138, + }, + }, + "name": { + "end": 154, + "loc": { + "end": { + "column": 16, + "line": 5, + "offset": 154, + }, + "start": { + "column": 2, + "line": 5, + "offset": 140, + }, + }, + "name": "DefinitionList", + "range": [ + 140, + 154, + ], + "raw": "DefinitionList", + "start": 140, + "type": "JSXIdentifier", + }, + "range": [ + 138, + 155, + ], + "raw": "", + "start": 138, + "type": "JSXClosingElement", + }, + "end": 155, + "loc": { + "end": { + "column": 17, + "line": 5, + "offset": 155, + }, + "start": { + "column": 0, + "line": 3, + "offset": 51, + }, + }, + "openingElement": { + "attributes": [ + { + "end": 75, + "loc": { + "end": { + "column": 24, + "line": 3, + "offset": 75, + }, + "start": { + "column": 16, + "line": 3, + "offset": 67, + }, + }, + "name": { + "end": 75, + "loc": { + "end": { + "column": 24, + "line": 3, + "offset": 75, + }, + "start": { + "column": 16, + "line": 3, + "offset": 67, + }, + }, + "name": "disabled", + "range": [ + 67, + 75, + ], + "raw": "disabled", + "start": 67, + "type": "JSXIdentifier", + }, + "range": [ + 67, + 75, + ], + "raw": "disabled", + "start": 67, + "type": "JSXAttribute", + "value": null, + }, + ], + "end": 76, + "loc": { + "end": { + "column": 25, + "line": 3, + "offset": 76, + }, + "start": { + "column": 0, + "line": 3, + "offset": 51, + }, + }, + "name": { + "end": 66, + "loc": { + "end": { + "column": 15, + "line": 3, + "offset": 66, + }, + "start": { + "column": 1, + "line": 3, + "offset": 52, + }, + }, + "name": "DefinitionList", + "range": [ + 52, + 66, + ], + "raw": "DefinitionList", + "start": 52, + "type": "JSXIdentifier", + }, + "range": [ + 51, + 76, + ], + "raw": "", + "selfClosing": false, + "start": 51, + "type": "JSXOpeningElement", + }, + "range": [ + 51, + 155, + ], + "raw": " + Hello World ! +", + "start": 51, + "type": "JSXElement", + }, + "loc": { + "end": { + "column": 18, + "line": 5, + "offset": 155, + }, + "start": { + "column": 1, + "line": 3, + "offset": 51, + }, + }, + "range": [ + 51, + 155, + ], + "start": 51, + "type": "ExpressionStatement", + }, + { "end": 170, "expression": { "children": [], @@ -33342,12 +33937,12 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 58, + "end": 65, "loc": { "end": { - "column": 11, + "column": 18, "line": 3, - "offset": 58, + "offset": 65, }, "start": { "column": 6, @@ -33380,9 +33975,9 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, "range": [ 53, - 58, + 65, ], - "raw": "title", + "raw": "title="Test"", "start": 53, "type": "JSXAttribute", "value": { @@ -33503,12 +34098,12 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 117, + "end": 155, "loc": { "end": { - "column": 5, + "column": 43, "line": 10, - "offset": 117, + "offset": 155, }, "start": { "column": 2, @@ -33541,9 +34136,9 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, "range": [ 114, - 117, + 155, ], - "raw": "src", + "raw": "src="https://via.placeholder.com/250x250"", "start": 114, "type": "JSXAttribute", "value": { @@ -33571,12 +34166,12 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, }, { - "end": 161, + "end": 164, "loc": { "end": { - "column": 5, + "column": 8, "line": 11, - "offset": 161, + "offset": 164, }, "start": { "column": 2, @@ -33609,9 +34204,9 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, "range": [ 158, - 161, + 164, ], - "raw": "alt", + "raw": "alt=""", "start": 158, "type": "JSXAttribute", "value": { @@ -33639,12 +34234,12 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, }, { - "end": 172, + "end": 175, "loc": { "end": { - "column": 7, + "column": 10, "line": 12, - "offset": 172, + "offset": 175, }, "start": { "column": 2, @@ -33677,9 +34272,9 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, "range": [ 167, - 172, + 175, ], - "raw": "title", + "raw": "title=""", "start": 167, "type": "JSXAttribute", "value": { @@ -33753,12 +34348,12 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` "value": null, }, { - "end": 204, + "end": 215, "loc": { "end": { - "column": 11, + "column": 22, "line": 15, - "offset": 204, + "offset": 215, }, "start": { "column": 2, @@ -33791,9 +34386,9 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, "range": [ 195, - 204, + 215, ], - "raw": "className", + "raw": "className="my-image"", "start": 195, "type": "JSXAttribute", "value": { @@ -33821,12 +34416,12 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, }, { - "end": 223, + "end": 229, "loc": { "end": { - "column": 7, + "column": 13, "line": 16, - "offset": 223, + "offset": 229, }, "start": { "column": 2, @@ -33859,9 +34454,9 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, "range": [ 218, - 223, + 229, ], - "raw": "width", + "raw": "width={250}", "start": 218, "type": "JSXAttribute", "value": { @@ -33911,12 +34506,12 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, }, { - "end": 238, + "end": 244, "loc": { "end": { - "column": 8, + "column": 14, "line": 17, - "offset": 238, + "offset": 244, }, "start": { "column": 2, @@ -33949,9 +34544,9 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, "range": [ 232, - 238, + 244, ], - "raw": "height", + "raw": "height={250}", "start": 232, "type": "JSXAttribute", "value": { @@ -34001,12 +34596,12 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, }, { - "end": 254, + "end": 262, "loc": { "end": { - "column": 9, + "column": 17, "line": 18, - "offset": 254, + "offset": 262, }, "start": { "column": 2, @@ -34039,9 +34634,9 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, "range": [ 247, - 254, + 262, ], - "raw": "loading", + "raw": "loading="eager"", "start": 247, "type": "JSXAttribute", "value": { @@ -34069,12 +34664,12 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, }, { - "end": 270, + "end": 293, "loc": { "end": { - "column": 7, + "column": 30, "line": 19, - "offset": 270, + "offset": 293, }, "start": { "column": 2, @@ -34107,9 +34702,9 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, "range": [ 265, - 270, + 293, ], - "raw": "style", + "raw": "style={{ display: 'block' }}", "start": 265, "type": "JSXAttribute", "value": { @@ -34229,12 +34824,12 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, }, { - "end": 302, + "end": 332, "loc": { "end": { - "column": 8, + "column": 38, "line": 20, - "offset": 302, + "offset": 332, }, "start": { "column": 2, @@ -34267,9 +34862,9 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, "range": [ 296, - 302, + 332, ], - "raw": "onLoad", + "raw": "onLoad={() => console.log('onLoad')}", "start": 296, "type": "JSXAttribute", "value": { @@ -34436,12 +35031,12 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, }, { - "end": 342, + "end": 373, "loc": { "end": { - "column": 9, + "column": 40, "line": 21, - "offset": 342, + "offset": 373, }, "start": { "column": 2, @@ -34474,9 +35069,9 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, "range": [ 335, - 342, + 373, ], - "raw": "onError", + "raw": "onError={() => console.log('onError')}", "start": 335, "type": "JSXAttribute", "value": { @@ -34643,12 +35238,12 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, }, { - "end": 383, + "end": 414, "loc": { "end": { - "column": 9, + "column": 40, "line": 22, - "offset": 383, + "offset": 414, }, "start": { "column": 2, @@ -34681,9 +35276,9 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` }, "range": [ 376, - 383, + 414, ], - "raw": "onClick", + "raw": "onClick={() => console.log('onClick')}", "start": 376, "type": "JSXAttribute", "value": { @@ -36359,684 +36954,1577 @@ exports[`parser should match all AST snapshots: 450.mdx 1`] = ` "value": "(", }, { - "end": 330, + "end": 330, + "loc": { + "end": { + "column": 36, + "line": 20, + "offset": 330, + }, + "start": { + "column": 28, + "line": 20, + "offset": 322, + }, + }, + "range": [ + 322, + 330, + ], + "start": 322, + "type": "String", + "value": "'onLoad'", + }, + { + "end": 331, + "loc": { + "end": { + "column": 37, + "line": 20, + "offset": 331, + }, + "start": { + "column": 36, + "line": 20, + "offset": 330, + }, + }, + "range": [ + 330, + 331, + ], + "start": 330, + "type": "Punctuator", + "value": ")", + }, + { + "end": 332, + "loc": { + "end": { + "column": 38, + "line": 20, + "offset": 332, + }, + "start": { + "column": 37, + "line": 20, + "offset": 331, + }, + }, + "range": [ + 331, + 332, + ], + "start": 331, + "type": "Punctuator", + "value": "}", + }, + { + "end": 342, + "loc": { + "end": { + "column": 9, + "line": 21, + "offset": 342, + }, + "start": { + "column": 2, + "line": 21, + "offset": 335, + }, + }, + "range": [ + 335, + 342, + ], + "start": 335, + "type": "JSXIdentifier", + "value": "onError", + }, + { + "end": 343, + "loc": { + "end": { + "column": 10, + "line": 21, + "offset": 343, + }, + "start": { + "column": 9, + "line": 21, + "offset": 342, + }, + }, + "range": [ + 342, + 343, + ], + "start": 342, + "type": "Punctuator", + "value": "=", + }, + { + "end": 344, + "loc": { + "end": { + "column": 11, + "line": 21, + "offset": 344, + }, + "start": { + "column": 10, + "line": 21, + "offset": 343, + }, + }, + "range": [ + 343, + 344, + ], + "start": 343, + "type": "Punctuator", + "value": "{", + }, + { + "end": 345, + "loc": { + "end": { + "column": 12, + "line": 21, + "offset": 345, + }, + "start": { + "column": 11, + "line": 21, + "offset": 344, + }, + }, + "range": [ + 344, + 345, + ], + "start": 344, + "type": "Punctuator", + "value": "(", + }, + { + "end": 346, + "loc": { + "end": { + "column": 13, + "line": 21, + "offset": 346, + }, + "start": { + "column": 12, + "line": 21, + "offset": 345, + }, + }, + "range": [ + 345, + 346, + ], + "start": 345, + "type": "Punctuator", + "value": ")", + }, + { + "end": 349, + "loc": { + "end": { + "column": 16, + "line": 21, + "offset": 349, + }, + "start": { + "column": 14, + "line": 21, + "offset": 347, + }, + }, + "range": [ + 347, + 349, + ], + "start": 347, + "type": "Punctuator", + "value": "=>", + }, + { + "end": 357, + "loc": { + "end": { + "column": 24, + "line": 21, + "offset": 357, + }, + "start": { + "column": 17, + "line": 21, + "offset": 350, + }, + }, + "range": [ + 350, + 357, + ], + "start": 350, + "type": "Identifier", + "value": "console", + }, + { + "end": 358, + "loc": { + "end": { + "column": 25, + "line": 21, + "offset": 358, + }, + "start": { + "column": 24, + "line": 21, + "offset": 357, + }, + }, + "range": [ + 357, + 358, + ], + "start": 357, + "type": "Punctuator", + "value": ".", + }, + { + "end": 361, + "loc": { + "end": { + "column": 28, + "line": 21, + "offset": 361, + }, + "start": { + "column": 25, + "line": 21, + "offset": 358, + }, + }, + "range": [ + 358, + 361, + ], + "start": 358, + "type": "Identifier", + "value": "log", + }, + { + "end": 362, + "loc": { + "end": { + "column": 29, + "line": 21, + "offset": 362, + }, + "start": { + "column": 28, + "line": 21, + "offset": 361, + }, + }, + "range": [ + 361, + 362, + ], + "start": 361, + "type": "Punctuator", + "value": "(", + }, + { + "end": 371, + "loc": { + "end": { + "column": 38, + "line": 21, + "offset": 371, + }, + "start": { + "column": 29, + "line": 21, + "offset": 362, + }, + }, + "range": [ + 362, + 371, + ], + "start": 362, + "type": "String", + "value": "'onError'", + }, + { + "end": 372, + "loc": { + "end": { + "column": 39, + "line": 21, + "offset": 372, + }, + "start": { + "column": 38, + "line": 21, + "offset": 371, + }, + }, + "range": [ + 371, + 372, + ], + "start": 371, + "type": "Punctuator", + "value": ")", + }, + { + "end": 373, + "loc": { + "end": { + "column": 40, + "line": 21, + "offset": 373, + }, + "start": { + "column": 39, + "line": 21, + "offset": 372, + }, + }, + "range": [ + 372, + 373, + ], + "start": 372, + "type": "Punctuator", + "value": "}", + }, + { + "end": 383, + "loc": { + "end": { + "column": 9, + "line": 22, + "offset": 383, + }, + "start": { + "column": 2, + "line": 22, + "offset": 376, + }, + }, + "range": [ + 376, + 383, + ], + "start": 376, + "type": "JSXIdentifier", + "value": "onClick", + }, + { + "end": 384, + "loc": { + "end": { + "column": 10, + "line": 22, + "offset": 384, + }, + "start": { + "column": 9, + "line": 22, + "offset": 383, + }, + }, + "range": [ + 383, + 384, + ], + "start": 383, + "type": "Punctuator", + "value": "=", + }, + { + "end": 385, + "loc": { + "end": { + "column": 11, + "line": 22, + "offset": 385, + }, + "start": { + "column": 10, + "line": 22, + "offset": 384, + }, + }, + "range": [ + 384, + 385, + ], + "start": 384, + "type": "Punctuator", + "value": "{", + }, + { + "end": 386, + "loc": { + "end": { + "column": 12, + "line": 22, + "offset": 386, + }, + "start": { + "column": 11, + "line": 22, + "offset": 385, + }, + }, + "range": [ + 385, + 386, + ], + "start": 385, + "type": "Punctuator", + "value": "(", + }, + { + "end": 387, + "loc": { + "end": { + "column": 13, + "line": 22, + "offset": 387, + }, + "start": { + "column": 12, + "line": 22, + "offset": 386, + }, + }, + "range": [ + 386, + 387, + ], + "start": 386, + "type": "Punctuator", + "value": ")", + }, + { + "end": 390, + "loc": { + "end": { + "column": 16, + "line": 22, + "offset": 390, + }, + "start": { + "column": 14, + "line": 22, + "offset": 388, + }, + }, + "range": [ + 388, + 390, + ], + "start": 388, + "type": "Punctuator", + "value": "=>", + }, + { + "end": 398, + "loc": { + "end": { + "column": 24, + "line": 22, + "offset": 398, + }, + "start": { + "column": 17, + "line": 22, + "offset": 391, + }, + }, + "range": [ + 391, + 398, + ], + "start": 391, + "type": "Identifier", + "value": "console", + }, + { + "end": 399, "loc": { "end": { - "column": 36, - "line": 20, - "offset": 330, + "column": 25, + "line": 22, + "offset": 399, }, "start": { - "column": 28, - "line": 20, - "offset": 322, + "column": 24, + "line": 22, + "offset": 398, }, }, "range": [ - 322, - 330, + 398, + 399, ], - "start": 322, - "type": "String", - "value": "'onLoad'", + "start": 398, + "type": "Punctuator", + "value": ".", }, { - "end": 331, + "end": 402, "loc": { "end": { - "column": 37, - "line": 20, - "offset": 331, + "column": 28, + "line": 22, + "offset": 402, }, "start": { - "column": 36, - "line": 20, - "offset": 330, + "column": 25, + "line": 22, + "offset": 399, }, }, "range": [ - 330, - 331, + 399, + 402, ], - "start": 330, - "type": "Punctuator", - "value": ")", + "start": 399, + "type": "Identifier", + "value": "log", }, { - "end": 332, + "end": 403, "loc": { "end": { - "column": 38, - "line": 20, - "offset": 332, + "column": 29, + "line": 22, + "offset": 403, }, "start": { - "column": 37, - "line": 20, - "offset": 331, + "column": 28, + "line": 22, + "offset": 402, }, }, "range": [ - 331, - 332, + 402, + 403, ], - "start": 331, + "start": 402, "type": "Punctuator", - "value": "}", + "value": "(", }, { - "end": 342, + "end": 412, "loc": { "end": { - "column": 9, - "line": 21, - "offset": 342, + "column": 38, + "line": 22, + "offset": 412, }, "start": { - "column": 2, - "line": 21, - "offset": 335, + "column": 29, + "line": 22, + "offset": 403, }, }, "range": [ - 335, - 342, + 403, + 412, ], - "start": 335, - "type": "JSXIdentifier", - "value": "onError", + "start": 403, + "type": "String", + "value": "'onClick'", }, { - "end": 343, + "end": 413, "loc": { "end": { - "column": 10, - "line": 21, - "offset": 343, + "column": 39, + "line": 22, + "offset": 413, }, "start": { - "column": 9, - "line": 21, - "offset": 342, + "column": 38, + "line": 22, + "offset": 412, }, }, "range": [ - 342, - 343, + 412, + 413, ], - "start": 342, + "start": 412, "type": "Punctuator", - "value": "=", + "value": ")", }, { - "end": 344, + "end": 414, "loc": { "end": { - "column": 11, - "line": 21, - "offset": 344, + "column": 40, + "line": 22, + "offset": 414, }, "start": { - "column": 10, - "line": 21, - "offset": 343, + "column": 39, + "line": 22, + "offset": 413, }, }, "range": [ - 343, - 344, + 413, + 414, ], - "start": 343, + "start": 413, "type": "Punctuator", - "value": "{", + "value": "}", }, { - "end": 345, + "end": 416, "loc": { "end": { - "column": 12, - "line": 21, - "offset": 345, + "column": 1, + "line": 23, + "offset": 416, }, "start": { - "column": 11, - "line": 21, - "offset": 344, + "column": 0, + "line": 23, + "offset": 415, }, }, "range": [ - 344, - 345, + 415, + 416, ], - "start": 344, + "start": 415, "type": "Punctuator", - "value": "(", + "value": "/", }, { - "end": 346, + "end": 417, "loc": { "end": { - "column": 13, - "line": 21, - "offset": 346, + "column": 2, + "line": 23, + "offset": 417, }, "start": { - "column": 12, - "line": 21, - "offset": 345, + "column": 1, + "line": 23, + "offset": 416, }, }, "range": [ - 345, - 346, + 416, + 417, ], - "start": 345, + "start": 416, "type": "Punctuator", - "value": ")", + "value": ">", }, + ], + "type": "Program", +} +`; + +exports[`parser should match all AST snapshots: 488.mdx 1`] = ` +{ + "body": [ { - "end": 349, - "loc": { - "end": { - "column": 16, - "line": 21, - "offset": 349, + "end": 77, + "expression": { + "children": [], + "closingElement": null, + "end": 77, + "loc": { + "end": { + "column": 2, + "line": 7, + "offset": 77, + }, + "start": { + "column": 0, + "line": 1, + "offset": 0, + }, }, - "start": { - "column": 14, - "line": 21, - "offset": 347, + "openingElement": { + "attributes": [ + { + "end": 18, + "loc": { + "end": { + "column": 11, + "line": 2, + "offset": 18, + }, + "start": { + "column": 2, + "line": 2, + "offset": 9, + }, + }, + "name": { + "end": 12, + "loc": { + "end": { + "column": 5, + "line": 2, + "offset": 12, + }, + "start": { + "column": 2, + "line": 2, + "offset": 9, + }, + }, + "name": "alt", + "range": [ + 9, + 12, + ], + "raw": "alt", + "start": 9, + "type": "JSXIdentifier", + }, + "range": [ + 9, + 18, + ], + "raw": "alt="alt"", + "start": 9, + "type": "JSXAttribute", + "value": { + "end": 18, + "loc": { + "end": { + "column": 11, + "line": 2, + "offset": 18, + }, + "start": { + "column": 6, + "line": 2, + "offset": 13, + }, + }, + "range": [ + 13, + 18, + ], + "raw": ""alt"", + "start": 13, + "type": "Literal", + "value": "alt", + }, + }, + { + "end": 30, + "loc": { + "end": { + "column": 11, + "line": 3, + "offset": 30, + }, + "start": { + "column": 2, + "line": 3, + "offset": 21, + }, + }, + "name": { + "end": 24, + "loc": { + "end": { + "column": 5, + "line": 3, + "offset": 24, + }, + "start": { + "column": 2, + "line": 3, + "offset": 21, + }, + }, + "name": "src", + "range": [ + 21, + 24, + ], + "raw": "src", + "start": 21, + "type": "JSXIdentifier", + }, + "range": [ + 21, + 30, + ], + "raw": "src="src"", + "start": 21, + "type": "JSXAttribute", + "value": { + "end": 30, + "loc": { + "end": { + "column": 11, + "line": 3, + "offset": 30, + }, + "start": { + "column": 6, + "line": 3, + "offset": 25, + }, + }, + "range": [ + 25, + 30, + ], + "raw": ""src"", + "start": 25, + "type": "Literal", + "value": "src", + }, + }, + { + "end": 44, + "loc": { + "end": { + "column": 13, + "line": 4, + "offset": 44, + }, + "start": { + "column": 2, + "line": 4, + "offset": 33, + }, + }, + "name": { + "end": 38, + "loc": { + "end": { + "column": 7, + "line": 4, + "offset": 38, + }, + "start": { + "column": 2, + "line": 4, + "offset": 33, + }, + }, + "name": "width", + "range": [ + 33, + 38, + ], + "raw": "width", + "start": 33, + "type": "JSXIdentifier", + }, + "range": [ + 33, + 44, + ], + "raw": "width="315"", + "start": 33, + "type": "JSXAttribute", + "value": { + "end": 44, + "loc": { + "end": { + "column": 13, + "line": 4, + "offset": 44, + }, + "start": { + "column": 8, + "line": 4, + "offset": 39, + }, + }, + "range": [ + 39, + 44, + ], + "raw": ""315"", + "start": 39, + "type": "Literal", + "value": "315", + }, + }, + { + "end": 59, + "loc": { + "end": { + "column": 14, + "line": 5, + "offset": 59, + }, + "start": { + "column": 2, + "line": 5, + "offset": 47, + }, + }, + "name": { + "end": 53, + "loc": { + "end": { + "column": 8, + "line": 5, + "offset": 53, + }, + "start": { + "column": 2, + "line": 5, + "offset": 47, + }, + }, + "name": "height", + "range": [ + 47, + 53, + ], + "raw": "height", + "start": 47, + "type": "JSXIdentifier", + }, + "range": [ + 47, + 59, + ], + "raw": "height="100"", + "start": 47, + "type": "JSXAttribute", + "value": { + "end": 59, + "loc": { + "end": { + "column": 14, + "line": 5, + "offset": 59, + }, + "start": { + "column": 9, + "line": 5, + "offset": 54, + }, + }, + "range": [ + 54, + 59, + ], + "raw": ""100"", + "start": 54, + "type": "Literal", + "value": "100", + }, + }, + { + "end": 74, + "loc": { + "end": { + "column": 14, + "line": 6, + "offset": 74, + }, + "start": { + "column": 2, + "line": 6, + "offset": 62, + }, + }, + "name": { + "end": 68, + "loc": { + "end": { + "column": 8, + "line": 6, + "offset": 68, + }, + "start": { + "column": 2, + "line": 6, + "offset": 62, + }, + }, + "name": "format", + "range": [ + 62, + 68, + ], + "raw": "format", + "start": 62, + "type": "JSXIdentifier", + }, + "range": [ + 62, + 74, + ], + "raw": "format="svg"", + "start": 62, + "type": "JSXAttribute", + "value": { + "end": 74, + "loc": { + "end": { + "column": 14, + "line": 6, + "offset": 74, + }, + "start": { + "column": 9, + "line": 6, + "offset": 69, + }, + }, + "range": [ + 69, + 74, + ], + "raw": ""svg"", + "start": 69, + "type": "Literal", + "value": "svg", + }, + }, + ], + "end": 77, + "loc": { + "end": { + "column": 2, + "line": 7, + "offset": 77, + }, + "start": { + "column": 0, + "line": 1, + "offset": 0, + }, + }, + "name": { + "end": 6, + "loc": { + "end": { + "column": 6, + "line": 1, + "offset": 6, + }, + "start": { + "column": 1, + "line": 1, + "offset": 1, + }, + }, + "name": "Image", + "range": [ + 1, + 6, + ], + "raw": "Image", + "start": 1, + "type": "JSXIdentifier", + }, + "range": [ + 0, + 77, + ], + "raw": "alt", + "selfClosing": true, + "start": 0, + "type": "JSXOpeningElement", }, + "range": [ + 0, + 77, + ], + "raw": "alt", + "start": 0, + "type": "JSXElement", }, - "range": [ - 347, - 349, - ], - "start": 347, - "type": "Punctuator", - "value": "=>", - }, - { - "end": 357, "loc": { "end": { - "column": 24, - "line": 21, - "offset": 357, + "column": 3, + "line": 7, + "offset": 77, }, "start": { - "column": 17, - "line": 21, - "offset": 350, + "column": 1, + "line": 1, + "offset": 0, }, }, "range": [ - 350, - 357, + 0, + 77, ], - "start": 350, - "type": "Identifier", - "value": "console", + "start": 0, + "type": "ExpressionStatement", }, - { - "end": 358, - "loc": { - "end": { - "column": 25, - "line": 21, - "offset": 358, - }, - "start": { - "column": 24, - "line": 21, - "offset": 357, - }, - }, - "range": [ - 357, - 358, - ], - "start": 357, - "type": "Punctuator", - "value": ".", + ], + "comments": [], + "end": 78, + "loc": { + "end": { + "column": 1, + "line": 8, + "offset": 78, }, + "start": { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "range": [ + 0, + 78, + ], + "sourceType": undefined, + "start": 0, + "tokens": [ { - "end": 361, + "end": 1, "loc": { "end": { - "column": 28, - "line": 21, - "offset": 361, + "column": 1, + "line": 1, + "offset": 1, }, "start": { - "column": 25, - "line": 21, - "offset": 358, + "column": 0, + "line": 1, + "offset": 0, }, }, "range": [ - 358, - 361, + 0, + 1, ], - "start": 358, - "type": "Identifier", - "value": "log", + "start": 0, + "type": "Punctuator", + "value": "<", }, { - "end": 362, + "end": 6, "loc": { "end": { - "column": 29, - "line": 21, - "offset": 362, + "column": 6, + "line": 1, + "offset": 6, }, "start": { - "column": 28, - "line": 21, - "offset": 361, + "column": 1, + "line": 1, + "offset": 1, }, }, "range": [ - 361, - 362, + 1, + 6, ], - "start": 361, - "type": "Punctuator", - "value": "(", + "start": 1, + "type": "JSXIdentifier", + "value": "Image", }, { - "end": 371, + "end": 12, "loc": { "end": { - "column": 38, - "line": 21, - "offset": 371, + "column": 5, + "line": 2, + "offset": 12, }, "start": { - "column": 29, - "line": 21, - "offset": 362, + "column": 2, + "line": 2, + "offset": 9, }, }, "range": [ - 362, - 371, + 9, + 12, ], - "start": 362, - "type": "String", - "value": "'onError'", + "start": 9, + "type": "JSXIdentifier", + "value": "alt", }, { - "end": 372, + "end": 13, "loc": { "end": { - "column": 39, - "line": 21, - "offset": 372, + "column": 6, + "line": 2, + "offset": 13, }, "start": { - "column": 38, - "line": 21, - "offset": 371, + "column": 5, + "line": 2, + "offset": 12, }, }, "range": [ - 371, - 372, + 12, + 13, ], - "start": 371, + "start": 12, "type": "Punctuator", - "value": ")", + "value": "=", }, { - "end": 373, + "end": 18, "loc": { "end": { - "column": 40, - "line": 21, - "offset": 373, + "column": 11, + "line": 2, + "offset": 18, }, "start": { - "column": 39, - "line": 21, - "offset": 372, + "column": 6, + "line": 2, + "offset": 13, }, }, "range": [ - 372, - 373, + 13, + 18, ], - "start": 372, - "type": "Punctuator", - "value": "}", + "start": 13, + "type": "String", + "value": ""alt"", }, { - "end": 383, + "end": 24, "loc": { "end": { - "column": 9, - "line": 22, - "offset": 383, + "column": 5, + "line": 3, + "offset": 24, }, "start": { "column": 2, - "line": 22, - "offset": 376, + "line": 3, + "offset": 21, }, }, "range": [ - 376, - 383, + 21, + 24, ], - "start": 376, + "start": 21, "type": "JSXIdentifier", - "value": "onClick", + "value": "src", }, { - "end": 384, + "end": 25, "loc": { "end": { - "column": 10, - "line": 22, - "offset": 384, + "column": 6, + "line": 3, + "offset": 25, }, "start": { - "column": 9, - "line": 22, - "offset": 383, + "column": 5, + "line": 3, + "offset": 24, }, }, "range": [ - 383, - 384, + 24, + 25, ], - "start": 383, + "start": 24, "type": "Punctuator", "value": "=", }, { - "end": 385, + "end": 30, "loc": { "end": { "column": 11, - "line": 22, - "offset": 385, + "line": 3, + "offset": 30, }, "start": { - "column": 10, - "line": 22, - "offset": 384, + "column": 6, + "line": 3, + "offset": 25, }, }, "range": [ - 384, - 385, + 25, + 30, ], - "start": 384, - "type": "Punctuator", - "value": "{", + "start": 25, + "type": "String", + "value": ""src"", }, { - "end": 386, + "end": 38, "loc": { "end": { - "column": 12, - "line": 22, - "offset": 386, + "column": 7, + "line": 4, + "offset": 38, }, "start": { - "column": 11, - "line": 22, - "offset": 385, + "column": 2, + "line": 4, + "offset": 33, }, }, "range": [ - 385, - 386, + 33, + 38, ], - "start": 385, - "type": "Punctuator", - "value": "(", + "start": 33, + "type": "JSXIdentifier", + "value": "width", }, { - "end": 387, + "end": 39, "loc": { "end": { - "column": 13, - "line": 22, - "offset": 387, + "column": 8, + "line": 4, + "offset": 39, }, "start": { - "column": 12, - "line": 22, - "offset": 386, + "column": 7, + "line": 4, + "offset": 38, }, }, "range": [ - 386, - 387, + 38, + 39, ], - "start": 386, + "start": 38, "type": "Punctuator", - "value": ")", + "value": "=", }, { - "end": 390, + "end": 44, "loc": { "end": { - "column": 16, - "line": 22, - "offset": 390, + "column": 13, + "line": 4, + "offset": 44, }, "start": { - "column": 14, - "line": 22, - "offset": 388, + "column": 8, + "line": 4, + "offset": 39, }, }, "range": [ - 388, - 390, + 39, + 44, ], - "start": 388, - "type": "Punctuator", - "value": "=>", + "start": 39, + "type": "String", + "value": ""315"", }, { - "end": 398, + "end": 53, "loc": { "end": { - "column": 24, - "line": 22, - "offset": 398, + "column": 8, + "line": 5, + "offset": 53, }, "start": { - "column": 17, - "line": 22, - "offset": 391, + "column": 2, + "line": 5, + "offset": 47, }, }, "range": [ - 391, - 398, + 47, + 53, ], - "start": 391, - "type": "Identifier", - "value": "console", + "start": 47, + "type": "JSXIdentifier", + "value": "height", }, { - "end": 399, + "end": 54, "loc": { "end": { - "column": 25, - "line": 22, - "offset": 399, + "column": 9, + "line": 5, + "offset": 54, }, "start": { - "column": 24, - "line": 22, - "offset": 398, + "column": 8, + "line": 5, + "offset": 53, }, }, "range": [ - 398, - 399, + 53, + 54, ], - "start": 398, + "start": 53, "type": "Punctuator", - "value": ".", - }, - { - "end": 402, - "loc": { - "end": { - "column": 28, - "line": 22, - "offset": 402, - }, - "start": { - "column": 25, - "line": 22, - "offset": 399, - }, - }, - "range": [ - 399, - 402, - ], - "start": 399, - "type": "Identifier", - "value": "log", + "value": "=", }, { - "end": 403, + "end": 59, "loc": { "end": { - "column": 29, - "line": 22, - "offset": 403, + "column": 14, + "line": 5, + "offset": 59, }, "start": { - "column": 28, - "line": 22, - "offset": 402, + "column": 9, + "line": 5, + "offset": 54, }, }, "range": [ - 402, - 403, + 54, + 59, ], - "start": 402, - "type": "Punctuator", - "value": "(", + "start": 54, + "type": "String", + "value": ""100"", }, { - "end": 412, + "end": 68, "loc": { "end": { - "column": 38, - "line": 22, - "offset": 412, + "column": 8, + "line": 6, + "offset": 68, }, "start": { - "column": 29, - "line": 22, - "offset": 403, + "column": 2, + "line": 6, + "offset": 62, }, }, "range": [ - 403, - 412, + 62, + 68, ], - "start": 403, - "type": "String", - "value": "'onClick'", + "start": 62, + "type": "JSXIdentifier", + "value": "format", }, { - "end": 413, + "end": 69, "loc": { "end": { - "column": 39, - "line": 22, - "offset": 413, + "column": 9, + "line": 6, + "offset": 69, }, "start": { - "column": 38, - "line": 22, - "offset": 412, + "column": 8, + "line": 6, + "offset": 68, }, }, "range": [ - 412, - 413, + 68, + 69, ], - "start": 412, + "start": 68, "type": "Punctuator", - "value": ")", + "value": "=", }, { - "end": 414, + "end": 74, "loc": { "end": { - "column": 40, - "line": 22, - "offset": 414, + "column": 14, + "line": 6, + "offset": 74, }, "start": { - "column": 39, - "line": 22, - "offset": 413, + "column": 9, + "line": 6, + "offset": 69, }, }, "range": [ - 413, - 414, + 69, + 74, ], - "start": 413, - "type": "Punctuator", - "value": "}", + "start": 69, + "type": "String", + "value": ""svg"", }, { - "end": 416, + "end": 76, "loc": { "end": { "column": 1, - "line": 23, - "offset": 416, + "line": 7, + "offset": 76, }, "start": { "column": 0, - "line": 23, - "offset": 415, + "line": 7, + "offset": 75, }, }, "range": [ - 415, - 416, + 75, + 76, ], - "start": 415, + "start": 75, "type": "Punctuator", "value": "/", }, { - "end": 417, + "end": 77, "loc": { "end": { "column": 2, - "line": 23, - "offset": 417, + "line": 7, + "offset": 77, }, "start": { "column": 1, - "line": 23, - "offset": 416, + "line": 7, + "offset": 76, }, }, "range": [ - 416, - 417, + 76, + 77, ], - "start": 416, + "start": 76, "type": "Punctuator", "value": ">", }, @@ -37892,7 +39380,31 @@ exports[`parser should match all AST snapshots: basic.mdx 1`] = ` { "end": 175, "expression": { - "children": [], + "children": [ + { + "end": 171, + "loc": { + "end": { + "column": 84, + "line": 9, + "offset": 171, + }, + "start": { + "column": 79, + "line": 9, + "offset": 166, + }, + }, + "range": [ + 166, + 171, + ], + "raw": "velit", + "start": 166, + "type": "JSXText", + "value": "velit", + }, + ], "closingElement": { "end": 175, "loc": { @@ -38028,7 +39540,52 @@ exports[`parser should match all AST snapshots: basic.mdx 1`] = ` { "end": 309, "expression": { - "children": [], + "children": [ + { + "end": 309, + "expression": { + "end": 308, + "loc": { + "end": { + "column": 39, + "line": 19, + "offset": 308, + }, + "start": { + "column": 1, + "line": 19, + "offset": 270, + }, + }, + "range": [ + 270, + 308, + ], + "raw": "Basic>{/* This is a comment */}{/* This is a comment */}
", + "start": 269, + "type": "JSXExpressionContainer", + }, + ], "closingElement": { "end": 309, "loc": { @@ -38207,28 +39764,6 @@ exports[`parser should match all AST snapshots: basic.mdx 1`] = ` "type": "Block", "value": " This is a comment ", }, - { - "end": 300, - "loc": { - "end": { - "column": 31, - "line": 19, - "offset": 300, - }, - "start": { - "column": 8, - "line": 19, - "offset": 277, - }, - }, - "range": [ - 277, - 300, - ], - "start": 277, - "type": "Block", - "value": " This is a comment ", - }, ], "end": 405, "loc": { @@ -39210,7 +40745,158 @@ exports[`parser should match all AST snapshots: blank-lines.mdx 1`] = ` { "end": 546, "expression": { - "children": [], + "children": [ + { + "end": 290, + "loc": { + "end": { + "column": 0, + "line": 18, + "offset": 290, + }, + "start": { + "column": 32, + "line": 17, + "offset": 286, + }, + }, + "range": [ + 286, + 290, + ], + "raw": " \\| +", + "start": 286, + "type": "JSXText", + "value": " | +", + }, + { + "end": 327, + "loc": { + "end": { + "column": 0, + "line": 19, + "offset": 327, + }, + "start": { + "column": 33, + "line": 18, + "offset": 323, + }, + }, + "range": [ + 323, + 327, + ], + "raw": " \\| +", + "start": 323, + "type": "JSXText", + "value": " | +", + }, + { + "end": 384, + "loc": { + "end": { + "column": 0, + "line": 20, + "offset": 384, + }, + "start": { + "column": 53, + "line": 19, + "offset": 380, + }, + }, + "range": [ + 380, + 384, + ], + "raw": " \\| +", + "start": 380, + "type": "JSXText", + "value": " | +", + }, + { + "end": 433, + "loc": { + "end": { + "column": 0, + "line": 21, + "offset": 433, + }, + "start": { + "column": 45, + "line": 20, + "offset": 429, + }, + }, + "range": [ + 429, + 433, + ], + "raw": " \\| +", + "start": 429, + "type": "JSXText", + "value": " | +", + }, + { + "end": 472, + "loc": { + "end": { + "column": 0, + "line": 22, + "offset": 472, + }, + "start": { + "column": 35, + "line": 21, + "offset": 468, + }, + }, + "range": [ + 468, + 472, + ], + "raw": " \\| +", + "start": 468, + "type": "JSXText", + "value": " | +", + }, + { + "end": 509, + "loc": { + "end": { + "column": 0, + "line": 23, + "offset": 509, + }, + "start": { + "column": 33, + "line": 22, + "offset": 505, + }, + }, + "range": [ + 505, + 509, + ], + "raw": " \\| +", + "start": 505, + "type": "JSXText", + "value": " | +", + }, + ], "closingElement": { "end": 546, "loc": { @@ -39272,12 +40958,12 @@ exports[`parser should match all AST snapshots: blank-lines.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 164, + "end": 168, "loc": { "end": { - "column": 3, + "column": 7, "line": 9, - "offset": 164, + "offset": 168, }, "start": { "column": 2, @@ -39310,9 +40996,9 @@ exports[`parser should match all AST snapshots: blank-lines.mdx 1`] = ` }, "range": [ 163, - 164, + 168, ], - "raw": "p", + "raw": "p={3}", "start": 163, "type": "JSXAttribute", "value": { @@ -39362,12 +41048,12 @@ exports[`parser should match all AST snapshots: blank-lines.mdx 1`] = ` }, }, { - "end": 173, + "end": 185, "loc": { "end": { - "column": 4, + "column": 16, "line": 10, - "offset": 173, + "offset": 185, }, "start": { "column": 2, @@ -39400,9 +41086,9 @@ exports[`parser should match all AST snapshots: blank-lines.mdx 1`] = ` }, "range": [ 171, - 173, + 185, ], - "raw": "bg", + "raw": "bg='lightgray'", "start": 171, "type": "JSXAttribute", "value": { @@ -39430,12 +41116,12 @@ exports[`parser should match all AST snapshots: blank-lines.mdx 1`] = ` }, }, { - "end": 193, + "end": 250, "loc": { "end": { - "column": 7, - "line": 11, - "offset": 193, + "column": 4, + "line": 14, + "offset": 250, }, "start": { "column": 2, @@ -39468,9 +41154,12 @@ exports[`parser should match all AST snapshots: blank-lines.mdx 1`] = ` }, "range": [ 188, - 193, + 250, ], - "raw": "style", + "raw": "style={{ + textAlign: 'center', + fontWeight: 'bold', + }}", "start": 188, "type": "JSXAttribute", "value": { @@ -39780,12 +41469,12 @@ exports[`parser should match all AST snapshots: blank-lines.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 608, + "end": 630, "loc": { "end": { - "column": 14, + "column": 36, "line": 31, - "offset": 608, + "offset": 630, }, "start": { "column": 7, @@ -39818,9 +41507,9 @@ exports[`parser should match all AST snapshots: blank-lines.mdx 1`] = ` }, "range": [ 601, - 608, + 630, ], - "raw": "tweetId", + "raw": "tweetId="1116723357410447360"", "start": 601, "type": "JSXAttribute", "value": { @@ -39923,7 +41612,56 @@ exports[`parser should match all AST snapshots: blank-lines.mdx 1`] = ` { "end": 703, "expression": { - "children": [], + "children": [ + { + "children": [ + { + "end": 686, + "loc": { + "end": { + "column": 35, + "line": 35, + "offset": 686, + }, + "start": { + "column": 2, + "line": 35, + "offset": 653, + }, + }, + "range": [ + 653, + 686, + ], + "raw": "Here's a text gradient shortcode!", + "start": 653, + "type": "JSXText", + "value": "Here's a text gradient shortcode!", + }, + ], + "depth": 1, + "end": 686, + "loc": { + "end": { + "column": 35, + "line": 35, + "offset": 686, + }, + "start": { + "column": 0, + "line": 35, + "offset": 651, + }, + }, + "range": [ + 651, + 686, + ], + "raw": "# Here's a text gradient shortcode!", + "start": 651, + "type": "MDXHeading", + }, + ], "closingElement": { "end": 703, "loc": { @@ -40081,12 +41819,12 @@ exports[`parser should match all AST snapshots: blank-lines.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 750, + "end": 764, "loc": { "end": { - "column": 16, + "column": 30, "line": 41, - "offset": 750, + "offset": 764, }, "start": { "column": 9, @@ -40119,9 +41857,9 @@ exports[`parser should match all AST snapshots: blank-lines.mdx 1`] = ` }, "range": [ 743, - 750, + 764, ], - "raw": "videoId", + "raw": "videoId="4fHw4GeW3EU"", "start": 743, "type": "JSXAttribute", "value": { @@ -41944,7 +43682,31 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` { "end": 90, "expression": { - "children": [], + "children": [ + { + "end": 79, + "loc": { + "end": { + "column": 20, + "line": 2, + "offset": 79, + }, + "start": { + "column": 6, + "line": 2, + "offset": 65, + }, + }, + "range": [ + 65, + 79, + ], + "raw": "Vuetify preset", + "start": 65, + "type": "JSXText", + "value": "Vuetify preset", + }, + ], "closingElement": { "end": 90, "loc": { @@ -42006,12 +43768,12 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 13, + "end": 44, "loc": { "end": { - "column": 13, + "column": 44, "line": 1, - "offset": 13, + "offset": 44, }, "start": { "column": 9, @@ -42044,9 +43806,9 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, "range": [ 9, - 13, + 44, ], - "raw": "kind", + "raw": "kind="docs-packages-vuetify-preset"", "start": 9, "type": "JSXAttribute", "value": { @@ -42074,12 +43836,12 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, }, { - "end": 50, + "end": 57, "loc": { "end": { - "column": 50, + "column": 57, "line": 1, - "offset": 50, + "offset": 57, }, "start": { "column": 45, @@ -42112,9 +43874,9 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, "range": [ 45, - 50, + 57, ], - "raw": "story", + "raw": "story="page"", "start": 45, "type": "JSXAttribute", "value": { @@ -42219,7 +43981,31 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` { "end": 225, "expression": { - "children": [], + "children": [ + { + "end": 214, + "loc": { + "end": { + "column": 20, + "line": 6, + "offset": 214, + }, + "start": { + "column": 6, + "line": 6, + "offset": 200, + }, + }, + "range": [ + 200, + 214, + ], + "raw": "Vuetify preset", + "start": 200, + "type": "JSXText", + "value": "Vuetify preset", + }, + ], "closingElement": { "end": 225, "loc": { @@ -42281,12 +44067,12 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 148, + "end": 179, "loc": { "end": { - "column": 13, + "column": 44, "line": 5, - "offset": 148, + "offset": 179, }, "start": { "column": 9, @@ -42319,9 +44105,9 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, "range": [ 144, - 148, + 179, ], - "raw": "kind", + "raw": "kind="docs-packages-vuetify-preset"", "start": 144, "type": "JSXAttribute", "value": { @@ -42349,12 +44135,12 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, }, { - "end": 185, + "end": 192, "loc": { "end": { - "column": 50, + "column": 57, "line": 5, - "offset": 185, + "offset": 192, }, "start": { "column": 45, @@ -42387,9 +44173,9 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, "range": [ 180, - 185, + 192, ], - "raw": "story", + "raw": "story="page"", "start": 180, "type": "JSXAttribute", "value": { @@ -42494,7 +44280,31 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` { "end": 360, "expression": { - "children": [], + "children": [ + { + "end": 349, + "loc": { + "end": { + "column": 20, + "line": 10, + "offset": 349, + }, + "start": { + "column": 6, + "line": 10, + "offset": 335, + }, + }, + "range": [ + 335, + 349, + ], + "raw": "Vuetify preset", + "start": 335, + "type": "JSXText", + "value": "Vuetify preset", + }, + ], "closingElement": { "end": 360, "loc": { @@ -42556,12 +44366,12 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 283, + "end": 314, "loc": { "end": { - "column": 13, + "column": 44, "line": 9, - "offset": 283, + "offset": 314, }, "start": { "column": 9, @@ -42594,9 +44404,9 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, "range": [ 279, - 283, + 314, ], - "raw": "kind", + "raw": "kind="docs-packages-vuetify-preset"", "start": 279, "type": "JSXAttribute", "value": { @@ -42624,12 +44434,12 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, }, { - "end": 320, + "end": 327, "loc": { "end": { - "column": 50, + "column": 57, "line": 9, - "offset": 320, + "offset": 327, }, "start": { "column": 45, @@ -42662,9 +44472,9 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, "range": [ 315, - 320, + 327, ], - "raw": "story", + "raw": "story="page"", "start": 315, "type": "JSXAttribute", "value": { @@ -42769,7 +44579,31 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` { "end": 495, "expression": { - "children": [], + "children": [ + { + "end": 484, + "loc": { + "end": { + "column": 20, + "line": 14, + "offset": 484, + }, + "start": { + "column": 6, + "line": 14, + "offset": 470, + }, + }, + "range": [ + 470, + 484, + ], + "raw": "Vuetify preset", + "start": 470, + "type": "JSXText", + "value": "Vuetify preset", + }, + ], "closingElement": { "end": 495, "loc": { @@ -42831,12 +44665,12 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 418, + "end": 449, "loc": { "end": { - "column": 13, + "column": 44, "line": 13, - "offset": 418, + "offset": 449, }, "start": { "column": 9, @@ -42869,9 +44703,9 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, "range": [ 414, - 418, + 449, ], - "raw": "kind", + "raw": "kind="docs-packages-vuetify-preset"", "start": 414, "type": "JSXAttribute", "value": { @@ -42899,12 +44733,12 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, }, { - "end": 455, + "end": 462, "loc": { "end": { - "column": 50, + "column": 57, "line": 13, - "offset": 455, + "offset": 462, }, "start": { "column": 45, @@ -42937,9 +44771,9 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, "range": [ 450, - 455, + 462, ], - "raw": "story", + "raw": "story="page"", "start": 450, "type": "JSXAttribute", "value": { @@ -43044,7 +44878,31 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` { "end": 630, "expression": { - "children": [], + "children": [ + { + "end": 619, + "loc": { + "end": { + "column": 20, + "line": 18, + "offset": 619, + }, + "start": { + "column": 6, + "line": 18, + "offset": 605, + }, + }, + "range": [ + 605, + 619, + ], + "raw": "Vuetify preset", + "start": 605, + "type": "JSXText", + "value": "Vuetify preset", + }, + ], "closingElement": { "end": 630, "loc": { @@ -43106,12 +44964,12 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 553, + "end": 584, "loc": { "end": { - "column": 13, + "column": 44, "line": 17, - "offset": 553, + "offset": 584, }, "start": { "column": 9, @@ -43144,9 +45002,9 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, "range": [ 549, - 553, + 584, ], - "raw": "kind", + "raw": "kind="docs-packages-vuetify-preset"", "start": 549, "type": "JSXAttribute", "value": { @@ -43174,12 +45032,12 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, }, { - "end": 590, + "end": 597, "loc": { "end": { - "column": 50, + "column": 57, "line": 17, - "offset": 590, + "offset": 597, }, "start": { "column": 45, @@ -43212,9 +45070,9 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, "range": [ 585, - 590, + 597, ], - "raw": "story", + "raw": "story="page"", "start": 585, "type": "JSXAttribute", "value": { @@ -43319,7 +45177,31 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` { "end": 765, "expression": { - "children": [], + "children": [ + { + "end": 754, + "loc": { + "end": { + "column": 20, + "line": 22, + "offset": 754, + }, + "start": { + "column": 6, + "line": 22, + "offset": 740, + }, + }, + "range": [ + 740, + 754, + ], + "raw": "Vuetify preset", + "start": 740, + "type": "JSXText", + "value": "Vuetify preset", + }, + ], "closingElement": { "end": 765, "loc": { @@ -43381,12 +45263,12 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` "openingElement": { "attributes": [ { - "end": 688, + "end": 719, "loc": { "end": { - "column": 13, + "column": 44, "line": 21, - "offset": 688, + "offset": 719, }, "start": { "column": 9, @@ -43419,9 +45301,9 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, "range": [ 684, - 688, + 719, ], - "raw": "kind", + "raw": "kind="docs-packages-vuetify-preset"", "start": 684, "type": "JSXAttribute", "value": { @@ -43449,12 +45331,12 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, }, { - "end": 725, + "end": 732, "loc": { "end": { - "column": 50, + "column": 57, "line": 21, - "offset": 725, + "offset": 732, }, "start": { "column": 45, @@ -43487,9 +45369,9 @@ exports[`parser should match all AST snapshots: jsx-in-list.mdx 1`] = ` }, "range": [ 720, - 725, + 732, ], - "raw": "story", + "raw": "story="page"", "start": 720, "type": "JSXAttribute", "value": { @@ -45472,7 +47354,286 @@ exports[`parser should match all AST snapshots: leading-spaces.mdx 1`] = ` { "end": 41, "expression": { - "children": [], + "children": [ + { + "children": [ + { + "end": 15, + "loc": { + "end": { + "column": 9, + "line": 2, + "offset": 15, + }, + "start": { + "column": 5, + "line": 2, + "offset": 11, + }, + }, + "range": [ + 11, + 15, + ], + "raw": "test", + "start": 11, + "type": "JSXText", + "value": "test", + }, + ], + "closingElement": { + "end": 19, + "loc": { + "end": { + "column": 13, + "line": 2, + "offset": 19, + }, + "start": { + "column": 9, + "line": 2, + "offset": 15, + }, + }, + "name": { + "end": 18, + "loc": { + "end": { + "column": 12, + "line": 2, + "offset": 18, + }, + "start": { + "column": 11, + "line": 2, + "offset": 17, + }, + }, + "name": "p", + "range": [ + 17, + 18, + ], + "raw": "p", + "start": 17, + "type": "JSXIdentifier", + }, + "range": [ + 15, + 19, + ], + "raw": "

", + "start": 15, + "type": "JSXClosingElement", + }, + "end": 19, + "loc": { + "end": { + "column": 13, + "line": 2, + "offset": 19, + }, + "start": { + "column": 2, + "line": 2, + "offset": 8, + }, + }, + "openingElement": { + "attributes": [], + "end": 11, + "loc": { + "end": { + "column": 5, + "line": 2, + "offset": 11, + }, + "start": { + "column": 2, + "line": 2, + "offset": 8, + }, + }, + "name": { + "end": 10, + "loc": { + "end": { + "column": 4, + "line": 2, + "offset": 10, + }, + "start": { + "column": 3, + "line": 2, + "offset": 9, + }, + }, + "name": "p", + "range": [ + 9, + 10, + ], + "raw": "p", + "start": 9, + "type": "JSXIdentifier", + }, + "range": [ + 8, + 11, + ], + "raw": "

", + "selfClosing": false, + "start": 8, + "type": "JSXOpeningElement", + }, + "range": [ + 8, + 19, + ], + "raw": "

test

", + "start": 8, + "type": "JSXElement", + }, + { + "children": [ + { + "end": 30, + "loc": { + "end": { + "column": 9, + "line": 4, + "offset": 30, + }, + "start": { + "column": 5, + "line": 4, + "offset": 26, + }, + }, + "range": [ + 26, + 30, + ], + "raw": "test", + "start": 26, + "type": "JSXText", + "value": "test", + }, + ], + "closingElement": { + "end": 34, + "loc": { + "end": { + "column": 13, + "line": 4, + "offset": 34, + }, + "start": { + "column": 9, + "line": 4, + "offset": 30, + }, + }, + "name": { + "end": 33, + "loc": { + "end": { + "column": 12, + "line": 4, + "offset": 33, + }, + "start": { + "column": 11, + "line": 4, + "offset": 32, + }, + }, + "name": "p", + "range": [ + 32, + 33, + ], + "raw": "p", + "start": 32, + "type": "JSXIdentifier", + }, + "range": [ + 30, + 34, + ], + "raw": "

", + "start": 30, + "type": "JSXClosingElement", + }, + "end": 34, + "loc": { + "end": { + "column": 13, + "line": 4, + "offset": 34, + }, + "start": { + "column": 2, + "line": 4, + "offset": 23, + }, + }, + "openingElement": { + "attributes": [], + "end": 26, + "loc": { + "end": { + "column": 5, + "line": 4, + "offset": 26, + }, + "start": { + "column": 2, + "line": 4, + "offset": 23, + }, + }, + "name": { + "end": 25, + "loc": { + "end": { + "column": 4, + "line": 4, + "offset": 25, + }, + "start": { + "column": 3, + "line": 4, + "offset": 24, + }, + }, + "name": "p", + "range": [ + 24, + 25, + ], + "raw": "p", + "start": 24, + "type": "JSXIdentifier", + }, + "range": [ + 23, + 26, + ], + "raw": "

", + "selfClosing": false, + "start": 23, + "type": "JSXOpeningElement", + }, + "range": [ + 23, + 34, + ], + "raw": "

test

", + "start": 23, + "type": "JSXElement", + }, + ], "closingElement": { "end": 41, "loc": { @@ -45609,278 +47770,6 @@ exports[`parser should match all AST snapshots: leading-spaces.mdx 1`] = ` "start": 0, "type": "ExpressionStatement", }, - { - "end": 19, - "expression": { - "children": [], - "closingElement": { - "end": 19, - "loc": { - "end": { - "column": 13, - "line": 2, - "offset": 19, - }, - "start": { - "column": 9, - "line": 2, - "offset": 15, - }, - }, - "name": { - "end": 18, - "loc": { - "end": { - "column": 12, - "line": 2, - "offset": 18, - }, - "start": { - "column": 11, - "line": 2, - "offset": 17, - }, - }, - "name": "p", - "range": [ - 17, - 18, - ], - "raw": "p", - "start": 17, - "type": "JSXIdentifier", - }, - "range": [ - 15, - 19, - ], - "raw": "

", - "start": 15, - "type": "JSXClosingElement", - }, - "end": 19, - "loc": { - "end": { - "column": 13, - "line": 2, - "offset": 19, - }, - "start": { - "column": 2, - "line": 2, - "offset": 8, - }, - }, - "openingElement": { - "attributes": [], - "end": 11, - "loc": { - "end": { - "column": 5, - "line": 2, - "offset": 11, - }, - "start": { - "column": 2, - "line": 2, - "offset": 8, - }, - }, - "name": { - "end": 10, - "loc": { - "end": { - "column": 4, - "line": 2, - "offset": 10, - }, - "start": { - "column": 3, - "line": 2, - "offset": 9, - }, - }, - "name": "p", - "range": [ - 9, - 10, - ], - "raw": "p", - "start": 9, - "type": "JSXIdentifier", - }, - "range": [ - 8, - 11, - ], - "raw": "

", - "selfClosing": false, - "start": 8, - "type": "JSXOpeningElement", - }, - "range": [ - 8, - 19, - ], - "raw": "

test

", - "start": 8, - "type": "JSXElement", - }, - "loc": { - "end": { - "column": 14, - "line": 2, - "offset": 19, - }, - "start": { - "column": 3, - "line": 2, - "offset": 8, - }, - }, - "range": [ - 8, - 19, - ], - "start": 8, - "type": "ExpressionStatement", - }, - { - "end": 34, - "expression": { - "children": [], - "closingElement": { - "end": 34, - "loc": { - "end": { - "column": 13, - "line": 4, - "offset": 34, - }, - "start": { - "column": 9, - "line": 4, - "offset": 30, - }, - }, - "name": { - "end": 33, - "loc": { - "end": { - "column": 12, - "line": 4, - "offset": 33, - }, - "start": { - "column": 11, - "line": 4, - "offset": 32, - }, - }, - "name": "p", - "range": [ - 32, - 33, - ], - "raw": "p", - "start": 32, - "type": "JSXIdentifier", - }, - "range": [ - 30, - 34, - ], - "raw": "

", - "start": 30, - "type": "JSXClosingElement", - }, - "end": 34, - "loc": { - "end": { - "column": 13, - "line": 4, - "offset": 34, - }, - "start": { - "column": 2, - "line": 4, - "offset": 23, - }, - }, - "openingElement": { - "attributes": [], - "end": 26, - "loc": { - "end": { - "column": 5, - "line": 4, - "offset": 26, - }, - "start": { - "column": 2, - "line": 4, - "offset": 23, - }, - }, - "name": { - "end": 25, - "loc": { - "end": { - "column": 4, - "line": 4, - "offset": 25, - }, - "start": { - "column": 3, - "line": 4, - "offset": 24, - }, - }, - "name": "p", - "range": [ - 24, - 25, - ], - "raw": "p", - "start": 24, - "type": "JSXIdentifier", - }, - "range": [ - 23, - 26, - ], - "raw": "

", - "selfClosing": false, - "start": 23, - "type": "JSXOpeningElement", - }, - "range": [ - 23, - 34, - ], - "raw": "

test

", - "start": 23, - "type": "JSXElement", - }, - "loc": { - "end": { - "column": 14, - "line": 4, - "offset": 34, - }, - "start": { - "column": 3, - "line": 4, - "offset": 23, - }, - }, - "range": [ - 23, - 34, - ], - "start": 23, - "type": "ExpressionStatement", - }, ], "comments": [], "end": 42, @@ -46382,7 +48271,31 @@ exports[`parser should match all AST snapshots: no-unescaped-entities.mdx 1`] = { "end": 25, "expression": { - "children": [], + "children": [ + { + "end": 16, + "loc": { + "end": { + "column": 16, + "line": 1, + "offset": 16, + }, + "start": { + "column": 8, + "line": 1, + "offset": 8, + }, + }, + "range": [ + 8, + 16, + ], + "raw": " ' ", + "start": 8, + "type": "JSXText", + "value": " ' ", + }, + ], "closingElement": { "end": 25, "loc": { @@ -46518,7 +48431,31 @@ exports[`parser should match all AST snapshots: no-unescaped-entities.mdx 1`] = { "end": 42, "expression": { - "children": [], + "children": [ + { + "end": 35, + "loc": { + "end": { + "column": 9, + "line": 2, + "offset": 35, + }, + "start": { + "column": 6, + "line": 2, + "offset": 32, + }, + }, + "range": [ + 32, + 35, + ], + "raw": " > ", + "start": 32, + "type": "JSXText", + "value": " > ", + }, + ], "closingElement": { "end": 42, "loc": { @@ -46654,7 +48591,31 @@ exports[`parser should match all AST snapshots: no-unescaped-entities.mdx 1`] = { "end": 76, "expression": { - "children": [], + "children": [ + { + "end": 67, + "loc": { + "end": { + "column": 23, + "line": 4, + "offset": 67, + }, + "start": { + "column": 15, + "line": 4, + "offset": 59, + }, + }, + "range": [ + 59, + 67, + ], + "raw": " ' ", + "start": 59, + "type": "JSXText", + "value": " ' ", + }, + ], "closingElement": { "end": 76, "loc": { @@ -46790,7 +48751,31 @@ exports[`parser should match all AST snapshots: no-unescaped-entities.mdx 1`] = { "end": 98, "expression": { - "children": [], + "children": [ + { + "end": 91, + "loc": { + "end": { + "column": 14, + "line": 5, + "offset": 91, + }, + "start": { + "column": 11, + "line": 5, + "offset": 88, + }, + }, + "range": [ + 88, + 91, + ], + "raw": " > ", + "start": 88, + "type": "JSXText", + "value": " > ", + }, + ], "closingElement": { "end": 98, "loc": { @@ -47998,7 +49983,31 @@ exports[`parser should match all AST snapshots: no-unused-expressions.mdx 1`] = { "end": 89, "expression": { - "children": [], + "children": [ + { + "end": 86, + "loc": { + "end": { + "column": 12, + "line": 10, + "offset": 86, + }, + "start": { + "column": 2, + "line": 10, + "offset": 76, + }, + }, + "range": [ + 76, + 86, + ], + "raw": " Fragment ", + "start": 76, + "type": "JSXText", + "value": " Fragment ", + }, + ], "closingFragment": { "end": 89, "loc": { @@ -48107,28 +50116,6 @@ exports[`parser should match all AST snapshots: no-unused-expressions.mdx 1`] = "type": "Block", "value": " HTML ", }, - { - "end": 54, - "loc": { - "end": { - "column": 24, - "line": 6, - "offset": 54, - }, - "start": { - "column": 14, - "line": 6, - "offset": 44, - }, - }, - "range": [ - 44, - 54, - ], - "start": 44, - "type": "Block", - "value": " HTML ", - }, ], "end": 90, "loc": { @@ -49488,28 +51475,6 @@ exports[`parser should match all AST snapshots: unicorn.mdx 1`] = ` "type": "Block", "value": " HTML ", }, - { - "end": 37, - "loc": { - "end": { - "column": 24, - "line": 3, - "offset": 37, - }, - "start": { - "column": 14, - "line": 3, - "offset": 27, - }, - }, - "range": [ - 27, - 37, - ], - "start": 27, - "type": "Block", - "value": " HTML ", - }, ], "end": 118, "loc": { diff --git a/test/fixtures.test.ts b/test/fixtures.test.ts index 35b61a01..1267827f 100644 --- a/test/fixtures.test.ts +++ b/test/fixtures.test.ts @@ -2,8 +2,9 @@ import path from 'node:path' import { ESLint } from 'eslint' -const getCli = (lintCodeBlocks = false) => +const getCli = (lintCodeBlocks = false, fix?: boolean) => new ESLint({ + fix, ignore: false, useEslintrc: false, baseConfig: { @@ -26,6 +27,11 @@ const getCli = (lintCodeBlocks = false) => version: 'detect', }, }, + rules: { + 'react/jsx-curly-brace-presence': 'error', + 'react/jsx-sort-props': 'error', + 'react/self-closing-comp': 'error', + }, overrides: lintCodeBlocks ? [ { @@ -50,23 +56,42 @@ const getCli = (lintCodeBlocks = false) => describe('fixtures', () => { it('should match all snapshots', async () => { - const results = await getCli().lintFiles([ + let results = await getCli().lintFiles([ 'test/fixtures/*', 'test/fixtures/**/*{md,mdx}', ]) for (const { filePath, messages } of results) { expect(messages).toMatchSnapshot(path.basename(filePath)) } + results = await getCli(false, true).lintFiles([ + 'test/fixtures/*', + 'test/fixtures/**/*{md,mdx}', + ]) + for (const { filePath, source, output } of results) { + if (source !== output) { + // eslint-disable-next-line jest/no-conditional-expect + expect(output).toMatchSnapshot(path.basename(filePath)) + } + } }) describe('lint code blocks', () => { it('should work as expected', async () => { - const results = await getCli(true).lintFiles( + let results = await getCli(true).lintFiles( 'test/fixtures/**/code-blocks.{md,mdx}', ) for (const { filePath, messages } of results) { expect(messages).toMatchSnapshot(path.basename(filePath)) } + results = await getCli(true, true).lintFiles( + 'test/fixtures/**/code-blocks.{md,mdx}', + ) + for (const { filePath, source, output } of results) { + if (source !== output) { + // eslint-disable-next-line jest/no-conditional-expect + expect(output).toMatchSnapshot(path.basename(filePath)) + } + } }) }) }) diff --git a/test/fixtures/437.mdx b/test/fixtures/437.mdx new file mode 100644 index 00000000..585b8d1b --- /dev/null +++ b/test/fixtures/437.mdx @@ -0,0 +1 @@ +{'bar'} diff --git a/test/fixtures/488.mdx b/test/fixtures/488.mdx new file mode 100644 index 00000000..f356b66c --- /dev/null +++ b/test/fixtures/488.mdx @@ -0,0 +1,7 @@ +alt diff --git a/yarn.lock b/yarn.lock index 0a25488e..44b378b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -35,20 +35,20 @@ "@commitlint/config-lerna-scopes" "^17.0.2" "@pkgr/utils" "^2.3.1" -"@1stg/common-config@^9.0.0": - version "9.0.0" - resolved "https://registry.yarnpkg.com/@1stg/common-config/-/common-config-9.0.0.tgz#7755fb2b47f7e5020c7a65944aaaca4a02bba8a4" - integrity sha512-4eObSMl7h7ZJZeat82SQykv4H38QVp38kB/nxZyIwRWhBptHpXvEIA62AQ5pear/+qJkQ6blq78X86lgbh90dg== +"@1stg/common-config@^9.0.1": + version "9.0.1" + resolved "https://registry.yarnpkg.com/@1stg/common-config/-/common-config-9.0.1.tgz#6398ee154a277ef52193ffd9e2671b14a8ed18fc" + integrity sha512-XEAcqqjQyRcDyqYXRLgPLs12Vi6sLqQMjkgewJo3awXVUuFgJD2ppHdSjS9AlBujsf9XwYeEBBWAk2CJUVmD2Q== dependencies: "@1stg/babel-preset" "^3.2.3" "@1stg/commitlint-config" "^3.2.0" - "@1stg/eslint-config" "^7.0.0" + "@1stg/eslint-config" "^7.0.1" "@1stg/lint-staged" "^3.4.1" "@1stg/markuplint-config" "^3.0.1" "@1stg/prettier-config" "^3.9.2" "@1stg/remark-preset" "^2.0.0" "@1stg/simple-git-hooks" "^0.2.3" - "@1stg/tsconfig" "^2.3.2" + "@1stg/tsconfig" "^2.3.3" "@babel/core" "^7.22.5" "@commitlint/cli" "^17.6.5" eslint "^8.43.0" @@ -63,10 +63,10 @@ resolved "https://registry.yarnpkg.com/@1stg/config/-/config-0.2.1.tgz#12d35ff8e243bd4b35b55c2f244cd5cbfea844d4" integrity sha512-fStBgzyQnL0/bdIcHCplmrjFN9SBfnkldQ+TnpKnBFmp7jIxoggSRL3kaEFbGlq2lbV/H7Udy3bmJWTtdDH5Iw== -"@1stg/eslint-config@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/@1stg/eslint-config/-/eslint-config-7.0.0.tgz#986eb594bc3cb6957cbb30e2a1ebddfda071b472" - integrity sha512-J1+0FbTvZK2CB/JokzP/D37GhAtJi42yAJep1wBw213QdDhktI2iV7VmwKvoPlLL8CB8JwF955UFKusG9lC7tA== +"@1stg/eslint-config@^7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@1stg/eslint-config/-/eslint-config-7.0.1.tgz#3e814033ce327ef59205b068fc353cfcfecbd0f7" + integrity sha512-qdGayfrv/LPanOs4N/yjt1yfMyeqYHGen/33wbBDVs9mmAJ+W9LCeueYaSfEzm0GOWeIJ6qIiLSHYiTcpGCDnw== dependencies: "@1stg/config" "^0.2.1" "@angular-eslint/eslint-plugin" "^16.0.3" @@ -108,12 +108,12 @@ eslint-plugin-vue "^9.15.0" eslint-plugin-yml "^1.8.0" -"@1stg/lib-config@^12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@1stg/lib-config/-/lib-config-12.0.0.tgz#843891ecd0478efd5ae28b74c22d88d9f6884dce" - integrity sha512-Dkz0ouc5M9DvkY0EG/RXNjTkcE544e5gScU2mKBInc8W7QOidBjji9OCsw29jxjS0o6cPRSELXZJbSJC2xfkrg== +"@1stg/lib-config@^12.0.1": + version "12.0.1" + resolved "https://registry.yarnpkg.com/@1stg/lib-config/-/lib-config-12.0.1.tgz#1fdf045b6ab57439eba4df1ab8a5cfc26909ac91" + integrity sha512-IovDXaUtwI4+mb0Ker81Hb618jDsaz1qXaQ+gMFX52l6G93DTFdULqfwCsqu0Mie4787bxL8l3r6ORHwuVq2Ww== dependencies: - "@1stg/common-config" "^9.0.0" + "@1stg/common-config" "^9.0.1" "@pkgr/rollup" "^4.1.1" "@1stg/lint-staged@^3.4.1": @@ -177,10 +177,10 @@ dependencies: "@pkgr/utils" "^2.3.1" -"@1stg/tsconfig@^2.3.2": - version "2.3.2" - resolved "https://registry.yarnpkg.com/@1stg/tsconfig/-/tsconfig-2.3.2.tgz#d843c542845d4d14350162507f711f216159cd8c" - integrity sha512-vNYoC1cvdGHCA3tJMUskaVsNVTt6QIOFO+eDtdO4JvqHllvi+o2QSqy5vTpAGMODSqbyFcLdPW7sD5kj9VQmNA== +"@1stg/tsconfig@^2.3.2", "@1stg/tsconfig@^2.3.3": + version "2.3.3" + resolved "https://registry.yarnpkg.com/@1stg/tsconfig/-/tsconfig-2.3.3.tgz#dc598fea2f75bf24a6da6039827679ca0213ece3" + integrity sha512-JHXiryRSs4w/ho/Uf3lDMlrYIf2p8+2gMgp23/j/HJfGF2+XwgRCnPgLA2VZ+LtGdqYX8ZJ4EmMgjFDdEdTMbg== "@aashutoshrathi/word-wrap@^1.2.3": version "1.2.6"