// Nx parses this file as JSONC, so comments are allowed even though strict JSON forbids them. // See https://github.com/nrwl/nx/blob/23.2.1/packages/nx/src/utils/json.ts#L33-L62 // Nx only recognizes the `nx.json` name, so it cannot be renamed to `.jsonc`/`.json5`. If your IDE // reports syntax errors, map `nx.json` to the JSON5/JSONC file type. Nx migrations and generators // rewrite this file without comments, so check their diffs. { "extends": "nx/presets/npm.json", "namedInputs": { "sharedGlobals": [ "{workspaceRoot}/.yarnrc.yml", "{workspaceRoot}/patches/*.patch", "{workspaceRoot}/package.json" ], "default": ["{projectRoot}/**/*", "sharedGlobals"], // Standard Nx name for a project's runtime files, i.e. everything except tests. "production": ["{projectRoot}/**/*", "!{projectRoot}/**/*.test.{ts,tsx}"] }, "tui": { "autoExit": true }, "targetDefaults": { "build:lib": { // Compiling a package reads the type declarations (`libDev`) of the packages it imports, // so their `type-check` must run first to produce their type declarations. "dependsOn": ["^type-check"], "inputs": [ "^production", "default", "{workspaceRoot}/tsconfig.base.json", "{workspaceRoot}/tsconfig.lib.json" ], "outputs": ["{projectRoot}/lib", "{projectRoot}/build"], "cache": true }, "type-check": { "dependsOn": [ "^type-check", "^guide-pull-content", "guide-pull-content", "@suite-common/message-system:build:lib" ], "inputs": [ "^production", "default", "{workspaceRoot}/tsconfig.base.json", "{workspaceRoot}/tsconfig.lib.json" ], "outputs": ["{projectRoot}/libDev"], "cache": true }, "test:unit": { "dependsOn": ["@suite-common/message-system:build:lib"], "inputs": [ "^production", "default", "{workspaceRoot}/jest.config.base.js", "{workspaceRoot}/jest.config.base.swc.js", "{workspaceRoot}/jest.config.native.js", "{workspaceRoot}/jest.config.swc-transform.js", "{workspaceRoot}/JestCustomEnv.js" ], "cache": true }, "lint:js": { "inputs": [ // Intentionally omits "^production". Basic ESLint rules don't need it, but type-aware rules formally do: // a type change in package `foo` may pass type-check in dependent package `bar`, but break // type-aware ESLint in `bar`. If `bar` stays cached, can be false negative → we merge with broken eslint. // However, this is very rare in practice. Not invalidating the cache of every downstream package // saves a **lot** of CI time, so we accept this formally incorrect shortcut. "{projectRoot}/**/*", "{workspaceRoot}/eslint.config.mjs", "{workspaceRoot}/eslint-local-rules/**/*", "{workspaceRoot}/packages/eslint/**/*", // Type-aware rules resolve each package's tsconfig, which extends this base config. "{workspaceRoot}/tsconfig.base.json", { "env": "ESLINT_RULE_SET" }, { "externalDependencies": ["eslint", "typescript-eslint", "typescript"] } ], "outputs": [ "{projectRoot}/.eslintcache", "{projectRoot}/.eslintcache-type-aware", "{projectRoot}/.eslintcache-all" ], "cache": true }, "lint:styles": { "inputs": [ "default", "{workspaceRoot}/.stylelintrc", "{workspaceRoot}/stylelint-local-rules/**/*" ], "outputs": ["{projectRoot}/.stylelintcache"], "cache": true }, "depcheck": { "inputs": ["default", "{workspaceRoot}/.depcheckrc.json"], "cache": true } }, "defaultBase": "origin/develop", "$schema": "./node_modules/nx/schemas/nx-schema.json", // Read-only token: it can download from the remote cache, but not upload to it. "nxCloudAccessToken": "NmE2NmFlYTUtN2JhZi00ZmQ3LWEyYzMtYWRkNzc3MTg0YmUyfHJlYWQ=", "analytics": false, "parallel": 3 }