prettier-plugin-sort-imports
prettier-plugin-sort-imports copied to clipboard
Use strict breaks import order
Your Environment
- Prettier version: 2.6.2
- node version: 16.14.0
- package manager: 8.3.1
- IDE: CLI
Describe the bug
'use strict' is pushed below imports.
To Reproduce
- Try to format this code:
'use strict'
import type { Period } from './Period'
- Bug appears.
import type { Period } from './Period'
;('use strict')
Expected behavior
Keep 'use strict' above.
Screenshots, code sample, etc
Configuration File (cat .prettierrc, prettier.config.js, .prettier.js)
{
"semi": false,
"trailingComma": "none",
"singleQuote": true,
"printWidth": 640,
"importOrder": ["@riot/metaplayer", "^[./]"],
"importOrderSeparation": true
}
Error log
Contribute to @trivago/prettier-plugin-sort-imports
- [ ] I'm willing to fix this bug 🥇
FWIW, this is fixed in a fork: https://github.com/IanVS/prettier-plugin-sort-imports/releases/tag/v3.3.1.
Can you give a try to v4.1.1 ?
Please feel free to reopen if the issue is still valid.