Skip to content

--debug-check for typescript is not working but --write #4415

@ianmuninio

Description

@ianmuninio

Prettier 1.12.1

The --write test.ts works perfectly but --debug-check.

--debug-check test.ts
--debug-check --parser typescript test.ts

Input:

// test.ts
const test = { "asd": 1 };
// .prettierrc
{
  "semi": true,
  "singleQuote": true,
  "tabWidth": 2,
  "useTabs": false
}
// .tslint.json
{
  "extends": ["tslint:latest", "tslint-config-prettier"],
  "rules": {
    "no-implicit-dependencies": false,
    "no-submodule-imports": false,
    "object-literal-sort-keys": false,
    "only-arrow-functions": false
  }
}

Output:

test.ts

Expected behavior:

[error] src/index.js: ast(input) !== ast(prettier(input))
[error] Index:
[error] ===================================================================
[error] ---
[error] +++
[error] @@ -17,6 +17,6 @@
[error]                    "method": false,
[error]                    "key": {
[error] -                    "type": "StringLiteral",
[error] -                    "value": "asd"
[error] +                    "type": "Identifier",
[error] +                    "name": "asd"
[error]                    },
[error]                    "computed": false,
[error]
[error] Index:
[error] ===================================================================
[error] ---
[error] +++
[error] @@ -1,1 +1,1 @@
[error] -const test = { "asd": 1 };
[error] +const test = { asd: 1 };
[error]

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliIssues with Prettier's Command Line Interfacelocked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.type:questionQuestions and support requests. Please use Stack Overflow for them, not the issue tracker.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions