VSCode
Search for global node_modules
folder (GLOBAL_NODE_MODULES)
node_modules
folder (GLOBAL_NODE_MODULES)Use the
npm config get prefix
command to find the path to themhy
executable file.The global
node_modules
folder should be around there somewhere. It varies between different systems, maybe it is right next to it, maybe inside alib
directory next to it or the upper levels.Inside the global
node_modules
folder, you'll findmhy/node_modules
. The path to that directory is what we will need.
Generating config files
Alias resolution and node_modules
resolution
node_modules
resolutionGenerate a tsconfig.json
file in your root folder mhy config typescript -io
. VSCode will handle it for you, even if you have a JavaScript project.
Prettier (for automatic formatting on save; recommended)
Generate prettier config mhy config prettier -io
and install Prettier - Code formatter
plugin.
Unfortunately you'll need to create watcher for each
File Type
you want the IDE to watch. By default it was creating it only for JavaScript. Most probably you want to addjsx, ts, tsx
watcher also. Do this with copying the watcher and change theFile Type
.
ESLint
ONLY in case you don't have
.eslintrc
file yet:mhy config eslint -i
Go to
File > Preferences > Settings > Extensions > ESLint
Enable
Click on
Edit in settings.json
Grab
mhy
's nodemodules path and add the following key into _VSCodesettings.json
:"eslint.nodePath": ".../mhy-node_modules-path",
Save it.
Last updated