next.js/.config/ast-grep/rules/no-context.yml
no-context.yml23 lines625 B
# yaml-language-server: $schema=https://raw.githubusercontent.com/ast-grep/ast-grep/main/schemas/rule.json

id: no-context
message: Don't name variables `context`.
note: Use a more specific name, such as chunking_context, asset_context, etc.
severity: error
language: Rust
rule:
  regex: \bcontext\b
  any:
    - all:
        - inside:
            any:
              - kind: closure_parameters
              - kind: parameter
              - kind: function_item
              - kind: let_declaration
        - kind: identifier
    - all:
        - kind: field_identifier
        - inside:
            kind: field_declaration
Quest for Codev2.0.0
/
SIGN IN