name: "tseslint:ban-types:Boolean"

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

args:
  Boolean: "Boolean"

summary: Prefer boolean type over Boolean type
reason: Boolean is a constructor function, boolean is a primitive type

tests:
  pass:
    - relative_path:
        - "index.ts"
      code: |
        const a: boolean = false;
  fail:
    - relative_path:
        - "index.ts"
      code: |
        const a: Boolean = false;
