{"_id":"@benkeentestorg/rush-lint-staged-plugin","_rev":"2-3db0794720713aeef48bd55693e825f2","name":"@benkeentestorg/rush-lint-staged-plugin","dist-tags":{"latest":"0.1.9"},"versions":{"0.1.7":{"name":"@benkeentestorg/rush-lint-staged-plugin","version":"0.1.7","description":"Rush plugin for lint-staged","keywords":["rush","plugin","command"],"homepage":"https://github.com/bytemate/rush-plugins#readme","repository":{"type":"git","url":"git+https://github.com/bytemate/rush-plugins.git","directory":"rush-plugins/rush-lint-staged-plugin"},"license":"MIT","author":{"name":"Cheng Liu","email":"chengcyber@outlook.com"},"type":"module","exports":{".":"./lib/index.mjs"},"scripts":{"build":"heft build --clean --lite","build:watch":"heft build --lite --watch","prepublishOnly":"npm run build","test":""},"dependencies":{"@rushstack/node-core-library":"3.44.1","lint-staged":"12.3.4"},"devDependencies":{"@rushstack/eslint-config":"2.4.5","@rushstack/heft":"0.43.2","@rushstack/heft-node-rig":"1.2.31","@types/heft-jest":"1.0.1","@types/node":"12.20.24","eslint":"7.32.0","typescript":"4.4.2"},"engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"gitHead":"98e24bb4a4bf4910da1389fd5b29d5e04103ca43","bugs":{"url":"https://github.com/bytemate/rush-plugins/issues"},"_id":"@benkeentestorg/rush-lint-staged-plugin@0.1.7","_nodeVersion":"16.19.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-WTcgV8Xjl0LIv55O9is/5JVbRunFbNbBkhHZ7DcRWvyzubmY9SVaYopTQhoK/EKLmYDub8jCPBCGfnxU7ceLtQ==","shasum":"2a1e227e502abddae7fd12e2738b7ed7f43caac4","tarball":"https://registry.npmjs.org/@benkeentestorg/rush-lint-staged-plugin/-/rush-lint-staged-plugin-0.1.7.tgz","fileCount":15,"unpackedSize":7572,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeVgqyV8eYyYo4nIBJINCVb6ueI/hzAEXy6wpntaEcRQIgFvnT/eZtgwkXtTQhx/E+gemKypSdgi6HFqurBNdst/8="}]},"_npmUser":{"name":"benkeen","email":"ben.keen@gmail.com"},"directories":{},"maintainers":[{"name":"benkeen","email":"ben.keen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rush-lint-staged-plugin_0.1.7_1683592634359_0.8532989568252121"},"_hasShrinkwrap":false},"0.1.8":{"name":"@benkeentestorg/rush-lint-staged-plugin","version":"0.1.8","description":"Rush plugin for lint-staged","keywords":["rush","plugin","command"],"homepage":"https://github.com/bytemate/rush-plugins#readme","repository":{"type":"git","url":"git+https://github.com/bytemate/rush-plugins.git","directory":"rush-plugins/rush-lint-staged-plugin"},"license":"MIT","author":{"name":"Cheng Liu","email":"chengcyber@outlook.com"},"type":"module","exports":{".":"./lib/index.mjs"},"scripts":{"build":"heft build --clean --lite","build:watch":"heft build --lite --watch","prepublishOnly":"npm run build","test":""},"dependencies":{"@rushstack/node-core-library":"3.44.1","lint-staged":"12.3.4"},"devDependencies":{"@rushstack/eslint-config":"2.4.5","@rushstack/heft":"0.43.2","@rushstack/heft-node-rig":"1.2.31","@types/heft-jest":"1.0.1","@types/node":"12.20.24","eslint":"7.32.0","typescript":"4.4.2"},"engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"gitHead":"71112cc00cf1942116d5f8dc35a136254b75e043","bugs":{"url":"https://github.com/bytemate/rush-plugins/issues"},"_id":"@benkeentestorg/rush-lint-staged-plugin@0.1.8","_nodeVersion":"16.19.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-maaDiUMR6gvhypIYNM2GnDsSD6KB2O5ZMgqUyJZQyf1xZG5c8qdfGb/rI/agykJTdIqmey9yVY0jG44cqjZRVQ==","shasum":"a24c3b461bc310ab830aef6ef9f64cdb34dbecbb","tarball":"https://registry.npmjs.org/@benkeentestorg/rush-lint-staged-plugin/-/rush-lint-staged-plugin-0.1.8.tgz","fileCount":15,"unpackedSize":7588,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD38iTEGdR0Y722kFdZwlHaOC1KIDuK4egUJeF5ya1lxwIhANQNZSEp2JiIV7jdTBMPph9g9wxYBLJyp0h1D4FLA1up"}]},"_npmUser":{"name":"benkeen","email":"ben.keen@gmail.com"},"directories":{},"maintainers":[{"name":"benkeen","email":"ben.keen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rush-lint-staged-plugin_0.1.8_1683593847331_0.39867305251276886"},"_hasShrinkwrap":false},"0.1.9":{"name":"@benkeentestorg/rush-lint-staged-plugin","version":"0.1.9","description":"Rush plugin for lint-staged","keywords":["rush","plugin","command"],"homepage":"https://github.com/bytemate/rush-plugins#readme","repository":{"type":"git","url":"git+https://github.com/bytemate/rush-plugins.git","directory":"rush-plugins/rush-lint-staged-plugin"},"license":"MIT","author":{"name":"Cheng Liu","email":"chengcyber@outlook.com"},"type":"module","exports":{".":"./lib/index.mjs"},"scripts":{"build":"heft build --clean --lite","build:watch":"heft build --lite --watch","prepublishOnly":"npm run build","test":""},"dependencies":{"@rushstack/node-core-library":"3.44.1","lint-staged":"12.3.4"},"devDependencies":{"@rushstack/eslint-config":"2.4.5","@rushstack/heft":"0.43.2","@rushstack/heft-node-rig":"1.2.31","@types/heft-jest":"1.0.1","@types/node":"12.20.24","eslint":"7.32.0","typescript":"4.4.2"},"engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"gitHead":"93ac35b97a342049856a46b86824eccd6e76563c","bugs":{"url":"https://github.com/bytemate/rush-plugins/issues"},"_id":"@benkeentestorg/rush-lint-staged-plugin@0.1.9","_nodeVersion":"16.19.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-Yw1/1wJ95zNZIIs5ttz3HDOI60dwj9YY9nj+SW2uDjnDm8MWognabu1hm0wAiLtxKVTOSh3n+vvcp4MEND266w==","shasum":"0a4697f64802b5fcaa3a5c8d304b67d580c003e6","tarball":"https://registry.npmjs.org/@benkeentestorg/rush-lint-staged-plugin/-/rush-lint-staged-plugin-0.1.9.tgz","fileCount":15,"unpackedSize":7573,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGWEuQlscy/E2e5Oqzql4B/ThyesF34CIKxooXrYzbNLAiB3VjOtcYb7xjpQ6nkGAIrmIUM3qXmEcWZV3MxFOKf57Q=="}]},"_npmUser":{"name":"benkeen","email":"ben.keen@gmail.com"},"directories":{},"maintainers":[{"name":"benkeen","email":"ben.keen@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rush-lint-staged-plugin_0.1.9_1683646179164_0.9762158954433955"},"_hasShrinkwrap":false}},"time":{"created":"2023-05-09T00:37:14.313Z","0.1.7":"2023-05-09T00:37:14.512Z","modified":"2023-05-09T15:29:39.432Z","0.1.8":"2023-05-09T00:57:27.535Z","0.1.9":"2023-05-09T15:29:39.331Z"},"maintainers":[{"name":"benkeen","email":"ben.keen@gmail.com"}],"description":"Rush plugin for lint-staged","homepage":"https://github.com/bytemate/rush-plugins#readme","keywords":["rush","plugin","command"],"repository":{"type":"git","url":"git+https://github.com/bytemate/rush-plugins.git","directory":"rush-plugins/rush-lint-staged-plugin"},"author":{"name":"Cheng Liu","email":"chengcyber@outlook.com"},"bugs":{"url":"https://github.com/bytemate/rush-plugins/issues"},"license":"MIT","readme":"# rush-lint-staged-plugin\r\n\r\nRush plugin for lint-staged\r\n\r\n# Prerequisite\r\n\r\n- Rush.js >= 5.57.0\r\n- Node >= 12\r\n\r\n# Quick Start\r\n\r\n1. Enabling this rush plugin\r\n\r\nPlease follow the [official doc](https://rushjs.io/pages/maintainer/using_rush_plugins/) to enable this plugin in your repo.\r\n\r\n2. Running `lint-staged`\r\n\r\n```\r\nrush lint-staged\r\n```\r\n\r\n3. Set up Git `pre-commit` hook\r\n\r\n**common/git-hooks/pre-commit**\r\n\r\n```\r\n#!/bin/sh\r\n\r\nnode common/scripts/install-run-rush.js lint-staged || exit $?\r\n```\r\n\r\n4. Add a placeholder `lint-staged` config in root path.\r\n\r\nThe reason of adding this file is the fact that `lint-staged` behaves differently with the number of config files. With this placeholder config, `lint-staged` will always find multiple config files in your monorepo, which corrects the working directory of each task.\r\n\r\n**<monorepo_root_path>/.lintstagedrc.json**\r\n\r\n```\r\n{\r\n  \"*\": \"echo ok\"\r\n}\r\n```\r\n\r\n# Rational\r\n\r\n`lint-staged@>=12.2.1` supports a new feature called multiple config files. With this feature, each staged files can load different lint-staged configuration. This plugin invokes `lintStaged` for you. No more no less.\r\n\r\nFor example,\r\n\r\n```\r\nmonorepo-root\r\n├── scripts\r\n|   └── index.js\r\n├── apps/my-app\r\n|   ├── index.js\r\n|   └── .lintstagedrc.js\r\n└── libraries/my-lib\r\n    ├── index.js\r\n    └── .lintstagedrc.js\r\n```\r\n\r\nAssuming git staged `apps/my-app/index.js`, `libraries/my-lib/index.js` and `scripts/index.js`\r\n\r\nwhen `rush lint-staged` runs,\r\n\r\n1. `apps/my-app/index.js` uses config from `apps/my-app/.lintstagedrc.js`\r\n2. `libraries/my-lib/index.js` uses config from `libraries/my-lib/.lintstagedrc.js`\r\n3. `scripts/index.js` has no related config, nothing runs for this file\r\n\r\n# LICENSE\r\n\r\nMIT [@chengcyber](https://github.com/chengcyber)\r\n","readmeFilename":"README.md"}