amatiasq / vsc-sort-imports

Sort ES6 imports automatically.
ISC License
57 stars 24 forks source link

code-insiders: cannot sort import, throws error #86

Closed t-ricci-enhancers closed 3 years ago

t-ricci-enhancers commented 3 years ago

On the latest code-insiders, using sort-imports v6.2.5 I'm trying to sort TypeScript (v4.0.7) imports and it will do nothing, but printing this error in the console. I'm on macOS Catalina (10.15.7 19H524), MacBook Pro Retina, 15-inch, Mid 2015 (Intel processor).

Code Insiders Version: 1.56.0-insider (Universal) Commit: ce791d27dc9889a392f4d29abefe9c53eb0b5129 Date: 2021-04-16T11:23:31.851Z (1 day ago) Electron: 11.4.2 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Darwin x64 19.6.0

17/04/2021, 19:25:17:
---------------------
Cannot find module 'import-sort-style-eslint'
Require stack:
- /Users/me/.vscode-insiders/extensions/amatiasq.sort-imports-6.2.5/out/config-cache.js
- /Users/me/.vscode-insiders/extensions/amatiasq.sort-imports-6.2.5/out/sort.js
- /Users/me/.vscode-insiders/extensions/amatiasq.sort-imports-6.2.5/out/extension.js
- /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js
- /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/bootstrap-amd.js
- /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/bootstrap-fork.js
t-ricci-enhancers commented 3 years ago

Also note I didn't set custom sorting preferences, but I have the eslint sort-imports rule active in my .eslintrc.js

    "sort-imports": [
      "warn",
      {
        ignoreCase: false,
        ignoreDeclarationSort: false,
        ignoreMemberSort: false,
        memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
        allowSeparatedGroups: false,
      },
    ],
secondfry commented 3 years ago

Can you please check if 6.2.6 works as expected for you?

t-ricci-enhancers commented 3 years ago

To me it looks like the latest version is now working