prettier-plugin-sort-imports icon indicating copy to clipboard operation
prettier-plugin-sort-imports copied to clipboard

invaild use of require

Open crazyair opened this issue 3 years ago • 3 comments

Your Environment

  • Prettier version: 2.x.x
  • node version [12.x.x, 14.x.x]:
  • package manager: [npm@7, pnpm@6, yarn@2]
  • IDE: [VScode, Webstorm, CLI]

Describe the bug

.prettierrc.js

module.exports = {
    ...require('@my/prettier-config'),
};

@my/prettier-config

module.exports = {
...
 "importOrder": ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
  importOrderSeparation: true,
  importOrderSortSpecifiers: true,
};

This is invalid

To Reproduce

Expected behavior

Screenshots, code sample, etc

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

Error log

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

  • [ ] I'm willing to fix this bug 🥇

crazyair avatar Mar 04 '22 07:03 crazyair

help

crazyair avatar Mar 22 '22 09:03 crazyair

?

crazyair avatar Mar 23 '22 10:03 crazyair

@ayusharma help

crazyair avatar Apr 21 '22 02:04 crazyair

Feel free to re-open if the issue still exists.

ayusharma avatar Feb 24 '23 19:02 ayusharma