name: "tseslint:ban-types:Symbol"

query: |
  query {
    File {
      type_annotation {
        type {
          span { str @filter(op: "=", value: ["$Symbol"]) }
          span_: span {
            start @output
            end @output
          }
        }
      }
    }
  }

args:
  Symbol: "Symbol"

summary: Prefer symbol type over Symbol type
reason: Symbol is a constructor function, symbol is a primitive type

tests:
  pass:
    - relative_path:
        - "index.ts"
      code: |
        declare const a: symbol;
  fail:
    - relative_path:
        - "index.ts"
      code: |
        declare const a: Symbol;
