JavaScript and TypeScript
Open a folder with a package.json and Ferris IDEA offers a run configuration per script, runs
Vitest and Jest into the result tree, formats with the project’s Prettier, fixes with its ESLint,
and debugs Node.js with js-debug. JavaScript and TypeScript support is Works;
Extract Interface, Extract Superclass and Pull Members Up are Experimental.
Before you start
Section titled “Before you start”-
Node.js. Ferris IDEA finds
nodeon thePATHand the versions of nvm (NVM_DIR) and fnm (FNM_DIR), and reads.nvmrc,.node-versionandengines.nodeto choose and check one. -
A language server. The first one found is used:
Server Install typescript-language-server npm install -g typescript-language-server typescript@5vtsls npm install -g @vtsls/language-servertsc --lsp(TypeScript 7)npm install -g typescript@7Terminal window npm install -g typescript-language-server typescript@5Terminal window npm install -g typescript-language-server typescript@5The install command Ferris IDEA names in language_servers, version 1.6.0.
The TypeScript installed beside the server is used when the project has none of its own, so a project does not need
node_modules/typescriptfor code insight. In a project you have not trusted, the project’s own TypeScript is never loaded. -
Framework servers, when you use them:
Framework Server Install Vue vue-language-server npm install -g @vue/language-server@2 typescriptSvelte svelteserver npm install -g svelte-language-serverAngular templates ngserver, only when angular.jsonexistsnpm install -g @angular/language-server -
js-debug for debugging: unpack the
js-debug-daprelease of the vscode-js-debug project so that~/.local/opt/js-debug-<version>/js-debug/src/dapDebugServer.jsexists (the newest such folder is used), or name that file inFERRIS_IDEA_JS_DEBUG. -
Prettier and ESLint as dev dependencies of the project. Ferris IDEA uses them only from the project’s
node_modules/.bin, never global ones.
The package manager
Section titled “The package manager”Ferris IDEA takes the package manager from the packageManager field, else from the lockfile
(package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lock, bun.lockb), else npm.
View › Tool Windows › npm lists the scripts of every package.json; the ▶ next to a script in
package.json runs it with that package manager.
Run scripts and files
Section titled “Run scripts and files”- Open the project. The run list shows npm run name for every script under “Detected from build files”, plus vitest or jest when the project depends on them.
- Run › Run Current File (⌃⇧R) on a
.js,.mjs,.cjs,.ts,.mtsor.ctsfile runsnode <file>. TypeScript files run through Node’s own type stripping, which needs Node 22.18 or later;.tsxand.d.tsfiles are not run, and TypeScript that needs a transform (enums, namespaces) fails in Node.
Run tests with Vitest and Jest
Section titled “Run tests with Vitest and Jest”- In a test file the gutter shows ▶ on every
describe,suite,itandtestcall. Run one and only that test runs, filtered by its full name. - The vitest and jest configurations run the whole suite with a JSON report that fills the result tree. See Run tests.
Mocha and Node’s own test runner are not read into the tree.
- Set a breakpoint (⌘F8) in a
.jsor.tsfile. - Run › Debug Current File (⌃⇧D), or debug a script
configuration: npm, pnpm, Yarn and Bun scripts,
npm startandnpm testrun under js-debug, which follows the child processes they start. A Jest ▶ offers Debug too; Jest is then run with--runInBand. - Step and evaluate as in Debug a program. To debug a Node process
started with
--inspect, use Attach to Process.
Format, lint and organize imports
Section titled “Format, lint and organize imports”- Reformat Code (⌥⌘L) uses the project’s Prettier for the whole file in a trusted project, otherwise the language server. Without Prettier, the server keeps one-line blocks as they are.
- Code › Reformat with Prettier (⌥⇧⌘P) also covers CSS, SCSS, Less, JSON, Markdown, YAML, HTML and GraphQL.
- Code › Fix ESLint Problems applies ESLint’s fixes. ESLint runs only when the project has a
configuration (
eslint.config.*,.eslintrc*oreslintConfiginpackage.json). - Code › Optimize Imports (⌃⌥O) uses the server’s own “remove unused” and “sort imports”, never ESLint or Prettier.
Refactor
Section titled “Refactor”Rename, Introduce Field and the server’s extract actions come from the language server. Ferris IDEA adds Extract Interface, Extract Superclass and Pull Members Up for TypeScript classes, worked out from the syntax tree, and its own Extract Variable where the server offers none (TypeScript 7).
When it does not work
Section titled “When it does not work”- “Cannot debug JavaScript: node or js-debug is missing …”: unpack the js-debug release into
~/.local/optor setFERRIS_IDEA_JS_DEBUG. - Reformat ignores your Prettier settings: Prettier is not in the project’s
node_modules, or the project is not trusted; run the package manager’s install and trust the project. - A TypeScript file does not run: the Node version is older than 22.18, or the file needs a transform. Use a script with your loader instead.
- Vue files have no insight: install the server with the command above
(
@vue/language-server@2).
Shortcuts
Section titled “Shortcuts”| Action | Shortcut |
|---|---|
| Code › Optimize Imports | ⌃⌥OCtrlAltO |
| Code › Reformat Code | ⌥⌘LCtrlAltL |
| Code › Reformat with Prettier | ⌥⇧⌘PCtrlAltShiftP |
| Run › Debug Current File | ⌃⇧Dno shortcut |
| Run › Run Current File | ⌃⇧RCtrlShiftF10 |
For agents
Section titled “For agents”debug_startStart a debug session: native programs with lldb-dap, Go with Delve (go_testfor tests), Python with debugpy, Node.js/TypeScript scripts or annpm_scriptwith js-debug, or a Kotlinmain_class.eslint_fileCheck a JavaScript/TypeScript file with the project's own ESLint (node_modules/.bin/eslintwith aneslint.config.*/.eslintrc*/eslintConfigin or above its package, inside the workspace; nothing is downloaded): findings with 1-based line, severity, rule, message and whether--fixcan fix them.extract_interfaceExtract Interface for the class at (or around) a position of a TypeScript file: creates the interface before the type with the signatures ofmembersand adds it toimplements(orextendsof an interface).extract_superclassExtract Superclass for the class at (or around) a position of a JavaScript or TypeScript file: createsclass namebefore it with the chosenmembers, moves them there and makes the class extend it.node_environmentNode.js setup of the workspace without starting node: runtimes from nvm, fnm and PATH with versions; which one is selected and why (incl.package_scriptsThe scripts of a package.json (what the ▶ markers next to them offer, SPEC-0168): name, 1-based line, command and the run configuration that runs it with the package's manager (packageManager, else the lockfile's, else npm) in the package's folder.prettier_fileFormat a file with the project's own Prettier (node_modules/.bin/prettierin or above its package, inside the workspace, with the project's configuration; nothing is downloaded).pull_members_upPull Members Up for the class at (or around) a position of a JavaScript or TypeScript file: movesmembersto the end of the direct supertype namedtarget(may be left out when there is only one), or adds their signature when it is an interface orabstractis true (an abstract class).
No tool matches. Try fewer words, or .