Skip to content

Commit

Permalink
rule: Avoid use of in_list
Browse files Browse the repository at this point in the history
  • Loading branch information
ankush committed Dec 27, 2023
1 parent 7c0228a commit c7222de
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rules/code_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ rules:
languages: [python]
severity: WARNING

- id: use-vanilla-js-include
pattern: in_list($LIST, $ITEM)
fix: $LIST.includes($ITEM)
message: |
in_list(list, item) is simple wrapper around list.includes(item), avoid use of such wrappers.
languages: [javascript]
severity: WARNING

0 comments on commit c7222de

Please sign in to comment.