Skip to content

SyntaxError: Unexpected token #363

@madflow

Description

@madflow

Your Environment

Describe the bug

npx prettier index.ts
index.ts
[error] index.ts: SyntaxError: Unexpected token (97:4)

To Reproduce

export default {
  importOrder: ["<THIRD_PARTY_MODULES>", "^[./]"],
  importOrderSeparation: true,
  plugins: ["@trivago/prettier-plugin-sort-imports"],
};

npx prettier index.ts

  • Without the plugin, the file gets formatted.

Expected behavior

  • No error

Screenshots, code sample, etc

Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)

export default {
  importOrder: ["<THIRD_PARTY_MODULES>", "^[./]"],
  importOrderSeparation: true,
  plugins: ["@trivago/prettier-plugin-sort-imports"],
};

Error log

Contribute to @trivago/prettier-plugin-sort-imports

  • I'm willing to fix this bug 🥇

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions