{"id":26350,"library":"rush-lint-staged-plugin","title":"Rush Lint-Staged Plugin","description":"A Rush.js plugin that integrates lint-staged into Rush monorepos, enabling per-project lint-staged configurations via the multi-config feature introduced in lint-staged >=12.2.1. Current stable version: 0.2.2. Released as part of TikTok's rush-plugins, with no fixed schedule. Key differentiator: automatically matches staged files to the nearest .lintstagedrc file in the monorepo, correcting working directories for tasks. Requires Rush >=5.57.0 and Node >=12.","status":"active","version":"0.2.2","language":"javascript","source_language":"en","source_url":"https://github.com/tiktok/rush-plugins","tags":["javascript","rush","plugin","command"],"install":[{"cmd":"npm install rush-lint-staged-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add rush-lint-staged-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add rush-lint-staged-plugin","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used to declare Rush plugin manifest.","package":"@rushstack/rush-plugin-manifest","optional":false}],"imports":[{"note":"This is a Rush plugin; it is invoked via the CLI command `rush lint-staged`, not imported directly.","wrong":"require('rush-lint-staged-plugin')","symbol":"rush-lint-staged-plugin","correct":"npx rush lint-staged"}],"quickstart":{"code":"# Enable the plugin in rush-plugins.json:\n# {\n#   \"plugins\": [\n#     {\n#       \"name\": \"rush-lint-staged-plugin\",\n#       \"version\": \"0.2.2\"\n#     }\n#   ]\n# }\n\n# Add a pre-commit hook (common/git-hooks/pre-commit):\n#!/bin/sh\nnode common/scripts/install-run-rush.js lint-staged || exit $?\n\n# Add a placeholder config at repo root (.lintstagedrc.json):\n{\n  \"*\": \"echo ok\"\n}\n\n# Create per-project .lintstagedrc files (e.g., apps/my-app/.lintstagedrc.js):\nmodule.exports = {\n  \"*.js\": \"eslint --fix\"\n};\n\n# Stage files and run:\ngit add somefile.js\nrush lint-staged","lang":"javascript","description":"Shows how to enable the Rush plugin, set up a pre-commit hook, add a placeholder config, and run lint-staged via Rush."},"warnings":[{"fix":"Add a .lintstagedrc.json file at the root with content: { \"*\": \"echo ok\" }.","message":"Requires a placeholder .lintstagedrc.json at monorepo root to avoid lint-staged misbehavior when only one config file exists.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Upgrade Rush to version 5.57.0 or later.","message":"Rush >=5.57.0 is required; older versions do not support the Rush plugin system.","severity":"breaking","affected_versions":"<0.0.0"},{"fix":"Ensure lint-staged is at version 12.2.1 or later in your projects.","message":"The plugin uses lint-staged's multi-config feature, which requires lint-staged >=12.2.1.","severity":"deprecated","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.2.2':40 '12':78 '12.2.1':36 '5.57.0':75 'automat':56 'command':82 'config':29 'configur':24 'correct':68 'current':37 'differenti':55 'directori':70 'enabl':17 'featur':30 'file':59,64 'fix':52 'integr':10 'introduc':31 'javascript':79 'key':54 'lint':3,12,22,34 'lint-stag':2,11,21,33 'lintstagedrc':63 'match':57 'monorepo':16,67 'multi':28 'multi-config':27 'nearest':62 'node':77 'part':43 'per':19 'per-project':18 'plugin':5,8,49,81 'project':20 'releas':41 'requir':73 'rush':1,15,48,74,80 'rush-plugin':47 'rush.js':7 'schedul':53 'stabl':38 'stage':4,13,23,35,58 'task':72 'tiktok':45 'version':39 'via':25 'work':69","created_at":"2026-05-01T13:49:31.960533+00:00","updated_at":"2026-05-01T13:49:31.960533+00:00","problems":[{"fix":"Add the plugin entry to common/config/rush/plugins.json with the correct name and version.","cause":"The plugin is not registered in rush-plugins.json or the version is incorrect.","error":"Rush: Plugin 'rush-lint-staged-plugin' is not found."},{"fix":"Ensure a .lintstagedrc file exists in the project root or add a placeholder at monorepo root.","cause":"No lint-staged configuration found for a staged file.","error":"Error: ENOENT: no such file or directory, open '.lintstagedrc'"},{"fix":"Upgrade Node.js to version 12 or later.","cause":"Node.js version is too old.","error":"lint-staged requires a minimum of Node.js 12"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/tiktok/rush-plugins","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/rush-lint-staged-plugin","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}