Skip to content

Commit

Permalink
[eslint] сделать правило на примитив useMemo
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanSilke committed Nov 17, 2023
1 parent 0bac0f8 commit c099641
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ module.exports = {
},
],

'no-restricted-syntax': ["error",
{
"selector": "CallExpression[callee.name = useMemo] ArrowFunctionExpression TemplateLiteral > Identifier",
"message": "Do not memorize primitives"
},
{
"selector": "CallExpression[callee.name = useMemo] FunctionExpression ReturnStatement TemplateLiteral > Identifier ",
"message": "Do not memorize primitives."
},
],

'default-param-last': 'warn',

'@typescript-eslint/member-ordering': [
Expand Down

0 comments on commit c099641

Please sign in to comment.