Skip to content

Commit

Permalink
add {@link $newName} to deprecation comments
Browse files Browse the repository at this point in the history
  • Loading branch information
etrepum committed May 10, 2024
1 parent 1c60e7b commit d5b6ea8
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 91 deletions.
80 changes: 0 additions & 80 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/lexical-eslint-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ references to that name is limited to the module's scope.
export function $exportedInvalidFunction() {
return $getRoot();
}
/** @deprecated renamed to $exportedInvalidFunction by @lexical/eslint-plugin rules-of-lexical */
/** @deprecated renamed to {@link $exportedInvalidFunction} by @lexical/eslint-plugin rules-of-lexical */
export const exportedInvalidFunction = $exportedInvalidFunction;
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const NAME_UNDERSCORE = (name: string) =>
!/^\$/.test(name) || /_$/.test(name) ? name : name + '_';
const REEXPORT = (name: string) =>
/^\$/.test(name)
? `\n/** @deprecated renamed to ${name} by @lexical/eslint-plugin rules-of-lexical */\nexport const ${name.replace(
? `\n/** @deprecated renamed to {@link ${name}} by @lexical/eslint-plugin rules-of-lexical */\nexport const ${name.replace(
/^\$/,
'',
)} = ${name};\n`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function getExportDeclaration(variable) {
* @param {Record<'caller'|'suggestName', string>} data
*/
function renameExportText({caller, suggestName}) {
return `\n/** @deprecated renamed to ${suggestName} by @lexical/eslint-plugin rules-of-lexical */\nexport const ${caller} = ${suggestName};`;
return `\n/** @deprecated renamed to {@link ${suggestName}} by @lexical/eslint-plugin rules-of-lexical */\nexport const ${caller} = ${suggestName};`;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/lexical-link/flow/LexicalLink.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@ declare export function $toggleLink(
url: null | string,
attributes: LinkAttributes,
): void;
/** @deprecated renamed to $toggleLink by @lexical/eslint-plugin rules-of-lexical */
/** @deprecated renamed to {@link $toggleLink} by @lexical/eslint-plugin rules-of-lexical */
declare const toggleLink: typeof $toggleLink;
2 changes: 1 addition & 1 deletion packages/lexical-link/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ export function $toggleLink(
});
}
}
/** @deprecated renamed to $toggleLink by @lexical/eslint-plugin rules-of-lexical */
/** @deprecated renamed to {@link $toggleLink} by @lexical/eslint-plugin rules-of-lexical */
export const toggleLink = $toggleLink;

function $getAncestor<NodeType extends LexicalNode = LexicalNode>(
Expand Down
2 changes: 1 addition & 1 deletion packages/lexical-offset/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ export function $createChildrenArray(
}
return children;
}
/** @deprecated renamed to $createChildrenArray by @lexical/eslint-plugin rules-of-lexical */
/** @deprecated renamed to {@link $createChildrenArray} by @lexical/eslint-plugin rules-of-lexical */
export const createChildrenArray = $createChildrenArray;

export function $createOffsetView(
Expand Down
2 changes: 1 addition & 1 deletion packages/lexical-selection/flow/LexicalSelection.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@ declare export function $trimTextContentFromAnchor(
delCount: number,
): void;

/** @deprecated renamed to $trimTextContentFromAnchor by @lexical/eslint-plugin rules-of-lexical */
/** @deprecated renamed to {@link $trimTextContentFromAnchor} by @lexical/eslint-plugin rules-of-lexical */
declare export const trimTextContentFromAnchor: typeof $trimTextContentFromAnchor;
2 changes: 1 addition & 1 deletion packages/lexical-selection/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export {
$sliceSelectedTextNodeContent,
$trimTextContentFromAnchor,
};
/** @deprecated renamed to $trimTextContentFromAnchor by @lexical/eslint-plugin rules-of-lexical */
/** @deprecated renamed to {@link $trimTextContentFromAnchor} by @lexical/eslint-plugin rules-of-lexical */
export const trimTextContentFromAnchor = $trimTextContentFromAnchor;

export {
Expand Down
3 changes: 1 addition & 2 deletions packages/lexical-website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

const {github: lightCodeTheme, dracula: darkCodeTheme} =
require('prism-react-renderer').themes;
const importPlugin = require('remark-import-partial');
const slugifyPlugin = require('./src/plugins/lexical-remark-slugify-anchors');
const {packagesManager} = require('../../scripts/shared/packagesManager');
const path = require('node:path');
Expand Down Expand Up @@ -245,7 +244,7 @@ const config = {
showReadingTime: true, // TODO: Update when directory finalized
},
docs: {
beforeDefaultRemarkPlugins: [importPlugin, slugifyPlugin],
beforeDefaultRemarkPlugins: [slugifyPlugin],
editUrl: `${GITHUB_REPO_URL}/tree/main/packages/lexical-website/`,
path: 'docs',
sidebarItemsGenerator,
Expand Down
1 change: 0 additions & 1 deletion packages/lexical-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"prism-react-renderer": "^2.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"remark-import-partial": "^0.0.2",
"typedoc-plugin-markdown": "^3.17.1",
"unist-util-visit": "^5.0.0"
},
Expand Down

0 comments on commit d5b6ea8

Please sign in to comment.