Insomnia Development Dependencies: Complete Guide to package.json devDependencies
Insomnia's top-level package.json declares development-specific dependencies—including ESLint, Prettier, TypeScript, Vitest, and esbuild—that are only required for linting, type-checking, testing, and building the application, and are explicitly excluded from production Electron builds.
The Kong/insomnia repository manages its development toolchain through a centralized devDependencies section in the root package.json. These packages enable the code quality standards, static analysis, and build processes necessary for contributing to the API client, while remaining isolated from the runtime environment of the released application.
Where Insomnia Declares Development Dependencies
Top-Level package.json Configuration
The primary development dependencies are defined in the devDependencies section of [package.json](https://github.com/Kong/insomnia/blob/develop/package.json) at the repository root (lines 49–76). According to the source code, these packages are not bundled with the released Electron app and are omitted from production installs.
Workspace-Specific package.json Files
Additional development dependencies are distributed across the monorepo workspaces:
packages/insomnia/package.json– Contains Electron app-specific development toolspackages/insomnia-testing/package.json– Defines shared testing utilities configurationpackages/insomnia-smoke-test/package.json– Houses the Playwright smoke-test setup that utilizeseslint-plugin-playwright
Categories of Development Dependencies in Insomnia
Linting and Code Formatting
Code style enforcement relies on the ESLint ecosystem and Prettier:
@eslint/js– Core JavaScript linting supporteslint– The primary linting engineeslint-config-prettier– Disables ESLint rules that conflict with Prettiereslint-plugin-reactandeslint-plugin-react-hooks– React-specific linting ruleseslint-plugin-simple-import-sort– Automated import organizationeslint-plugin-unicorn– Additional code quality rulesprettier– Code formatting engineprettier-plugin-tailwindcss– Tailwind CSS class sorting
TypeScript Tooling
Static type checking is implemented through:
typescript– The TypeScript compiler (tsc)@typescript-eslint/eslint-pluginand@typescript-eslint/parser– TypeScript integration with ESLinttypescript-eslint– Modern TypeScript ESLint configuration@types/node– Type definitions for Node.js APIs used throughout the codebasetslib– TypeScript runtime helpers
Testing Infrastructure
The testing stack includes:
vitest– Unit test runner executed vianpm test@types/chaiand@types/mocha– Type definitions for assertion frameworkseslint-plugin-playwright– Linting rules for end-to-end test files
Build Tools
Fast bundling for the Electron renderer and CLI is handled by:
esbuild– High-performance JavaScript bundleresbuild-runner– Direct execution of TypeScript files via esbuild
Utility Libraries and Type Definitions
Supporting development utilities include:
@types/har-format– Type definitions for HTTP Archive format@types/chai,@types/mocha– Testing framework type definitionsglobals– Global variable definitions for ESLint configurationmadge– Circular dependency detection toolpatch-package– Node module patching utilitytype-fest– Useful TypeScript type utilities
How Dev Dependencies Power the Development Workflow
These packages integrate directly with the npm scripts defined in the root package.json:
{
"scripts": {
"lint": "eslint . --ext .ts,.tsx",
"type-check": "tsc --noEmit",
"test": "vitest run",
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,css,md}\""
}
}
Linting (eslint): The eslint command scans all TypeScript and TSX files using the configured plugins, including @typescript-eslint/* for type-aware rules and eslint-plugin-react for React components.
Type Checking (tsc): The typescript package provides the tsc compiler, which runs with --noEmit to validate types without generating output files.
Testing (vitest): The vitest package executes unit tests located alongside source files, while workspace-specific configurations in packages/insomnia-smoke-test handle Playwright integration for end-to-end testing.
Formatting (prettier): The prettier and prettier-plugin-tailwindcss packages format code according to the project's style guide, handling TypeScript, JSON, CSS, and Markdown files.
Summary
- Insomnia's development dependencies are centralized in the root
package.jsondevDependenciessection (lines 49–76) and are excluded from production Electron builds. - Linting and formatting rely on the ESLint ecosystem including
@typescript-eslint/*,eslint-plugin-react, andprettier. - TypeScript tooling includes the
typescriptcompiler, parser plugins, and Node.js type definitions for static analysis. - Testing uses
vitestfor unit tests andeslint-plugin-playwrightfor end-to-end smoke tests in theinsomnia-smoke-testworkspace. - Build tools leverage
esbuildandesbuild-runnerfor fast bundling of the renderer process and CLI. - These dependencies support development scripts like
npm run lint,npm run type-check, andnpm testthat maintain code quality across the monorepo.
Frequently Asked Questions
What is the difference between dependencies and devDependencies in Insomnia?
Dependencies are required at runtime for the Electron application to function, while devDependencies in Insomnia's package.json are only needed during development, building, testing, and linting. These development packages are not bundled with the released application and are omitted when installing for production environments.
How do I install only the development dependencies for Insomnia?
Running npm install in a development environment automatically installs both dependencies and devDependencies. To install only production dependencies (excluding the development tools like ESLint and TypeScript), use npm install --production or set NODE_ENV=production before installing.
Which testing tools are included in Insomnia's devDependencies?
Insomnia includes vitest for unit testing, @types/chai and @types/mocha for type definitions, and eslint-plugin-playwright for linting end-to-end tests. The actual Playwright configuration and smoke tests reside in packages/insomnia-smoke-test/package.json.
Are ESLint and Prettier required to build Insomnia from source?
While not required for the final Electron build, ESLint and Prettier are required for the standard development workflow and CI/CD pipeline. The esbuild and typescript packages are essential for building the application from source, as they bundle TypeScript files and perform type checking before packaging the Electron app.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →