Skip to content

Commit 75ad97b

Browse files
committed
fix: fix rule name
1 parent e13b580 commit 75ad97b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/rules/ts-ban-snippets.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@ export type Options = [];
44
export type MessageIds = "BannedSnippetMessage";
55

66
const createRule = ESLintUtils.RuleCreator((name) => {
7-
return `https://github.com/mrseanryan/eslint-plugin-ts-ban-snippets/blob/master/docs/${name}.md`;
7+
return `https://github.com/mrseanryan/eslint-plugin-ts-ban-snippets/blob/main/docs/${name}.md`;
88
});
99

1010
const BannedSnippetMessage = "{{name}} is a banned code snippet";
1111

1212
export default createRule<Options, MessageIds>({
13-
name: "js-function-in-worklet",
13+
name: "ts-ban-snippets",
1414
meta: {
1515
type: "problem",
1616
docs: {
17-
description:
18-
"non-worklet functions should be invoked via runOnJS. Use runOnJS() or workletlize instead.",
17+
description: "This TypeScript snippet is banned and should not be used.",
1918
category: "Possible Errors",
2019
recommended: "error",
2120
},
@@ -38,8 +37,7 @@ export default createRule<Options, MessageIds>({
3837
Program: (node) => {
3938
const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
4039

41-
if (tsNode.getText().indexOf(bannedSnippet) >= 0)
42-
{
40+
if (tsNode.getText().indexOf(bannedSnippet) >= 0) {
4341
context.report({
4442
messageId: "BannedSnippetMessage",
4543
...node,

0 commit comments

Comments
 (0)