File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -4,18 +4,17 @@ export type Options = [];
44export type MessageIds = "BannedSnippetMessage" ;
55
66const 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
1010const BannedSnippetMessage = "{{name}} is a banned code snippet" ;
1111
1212export 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 ,
You can’t perform that action at this time.
0 commit comments