Skip to content

--stdin-filename option is gone and now stdin is completely broken again #273

Description

@mrpeabody

What version of this package are you using?

The most recent 12.0.1

What operating system, Node.js, and npm version?
Ubuntu 22.04 LTS, Node v14.19.3, NPM 6.14.17
What happened?

ts-standard does not support reading files from stdin. Previous workaround was to specify the --stdin-filename option which is not available anymore.

Easy to repro: have a type import in a .ts file (import type { ... ] from '...') and then check the file from stdin:

ts-standard --stdin < <filename>.ts

Output:

ts-standard: Standard for TypeScript! (https://github.com/standard/ts-standard)
  <text>:18:13: Parsing error: Unexpected token { (null)

Regular check works fine: ts-standard <filename>.ts

ts-standard: Standard for TypeScript! (https://github.com/standard/ts-standard)
ts-standard: Run `ts-standard --fix` to automatically fix some problems.
  <path>.ts:116:20: A space is required after '{'. (@typescript-eslint/object-curly-spacing)
  <path>.ts:116:43: A space is required before '}'. (@typescript-eslint/object-curly-spacing)

What did you expect to happen?

I'd expect it to work (that is, either fix --stdin or return --stdin-filename option back)

Are you willing to submit a pull request to fix this bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions