open-nomad/.semgrep/ui.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
654 B
YAML
Raw Normal View History

rules:
- id: ui-no-string-extensions
patterns:
- pattern: "$S.$FUNC()"
- metavariable-pattern:
metavariable: $FUNC
pattern-either:
- pattern: "w"
- pattern: "loc"
- pattern: "camelize"
- pattern: "decamelize"
- pattern: "dasherize"
- pattern: "underscore"
- pattern: "classify"
- pattern: "capitalize"
message: "Invalid call to string extension `$FUNC` in `$S.$FUNC()`"
languages:
- javascript
severity: ERROR
paths:
include:
- "ui/**/*.js"
exclude:
- "ui/node_modules"