Installations
npm install @ms918/mrm-task-lint-staged
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
14.16.0
NPM Version
lerna/3.22.1/node@v14.16.0+x64 (linux)
Score
59.3
Supply Chain
85.5
Quality
73
Maintenance
100
Vulnerability
99.3
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
mengshang918
Download Statistics
Total Downloads
1,109
Last Day
1
Last Week
2
Last Month
24
Last Year
137
GitHub Statistics
MIT License
2 Stars
16 Commits
1 Watchers
10 Branches
1 Contributors
Updated on Mar 08, 2023
Bundle Size
532.23 kB
Minified
151.25 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.5.2
Package Id
@ms918/mrm-task-lint-staged@0.5.2
Unpacked Size
5.81 kB
Size
2.60 kB
File Count
5
NPM Version
lerna/3.22.1/node@v14.16.0+x64 (linux)
Node Version
14.16.0
Total Downloads
Cumulative downloads
Total Downloads
1,109
Last Day
0%
1
Compared to previous day
Last Week
-60%
2
Compared to previous week
Last Month
100%
24
Compared to previous month
Last Year
-34.1%
137
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
3
@ms918/mrm-task-lint-staged
mrm task,用来配置
lint-staged
,可选 eslint 和 prettier(需要配合@ms918/mrm-task-eslint、@ms918/mrm-task-prettier)
创建的默认package.json
字段如下
1{ 2 "husky": { 3 "hooks": { 4 "pre-commit": "lint-staged" 5 } 6 }, 7 "devDependencies": { 8 "husky": "^4.3.0" 9 }, 10 "lint-staged": { 11 "*.{tsx,ts,jsx,js}": ["eslint --fix", "prettier --write ."], 12 "*.{md,mdx}": ["prettier --write ."] 13 } 14}
默认
默认选择 eslint 和 prettier,创建配置如上。
只选择 eslint,创建配置如下
1{ 2 "husky": { 3 "hooks": { 4 "pre-commit": "lint-staged" 5 } 6 }, 7 "devDependencies": { 8 "husky": "^4.3.0" 9 }, 10 "lint-staged": { 11 "*.{tsx,ts,jsx,js}": ["eslint --fix"] 12 } 13}
只选择 prettier,创建配置如下
1{ 2 "husky": { 3 "hooks": { 4 "pre-commit": "lint-staged" 5 } 6 }, 7 "devDependencies": { 8 "husky": "^4.3.0" 9 }, 10 "lint-staged": { 11 "*.{tsx,ts,jsx,js}": ["prettier --config .prettierrc.yml --write"], 12 "*.{md,mdx}": ["prettier --config .prettierrc.yml --write"] 13 } 14}
用法
1npm install -g @ms918/mrm-task-lint-staged 2mrm @ms918/mrm-task-lint-staged
当执行的时候,会走下面步骤:
- 执行
@ms918/mrm-task-husky
步骤 - 判断
husky.pre-commit
是否有脚本- 有,则设置
husky.pre-commit
为之前脚本 && lint-staged
- 无,则设置
husky.pre-commit
为lint-staged
- 有,则设置
yarn
ornpm
安装lint-staged
- 设置
package.json
的lint-staged
字段为上述所示

No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/16 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/node.js.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/mengshang918/project-cli/node.js.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/mengshang918/project-cli/node.js.yml/master?enable=pin
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
51 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-33f9-j839-rf8h
- Warn: Project is vulnerable to: GHSA-c36v-fmgq-m8hx
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-3j8f-xvm3-ffx4
- Warn: Project is vulnerable to: GHSA-4p35-cfcx-8653
- Warn: Project is vulnerable to: GHSA-7f3x-x4pr-wqhj
- Warn: Project is vulnerable to: GHSA-jpp7-7chh-cf67
- Warn: Project is vulnerable to: GHSA-q6wq-5p59-983w
- Warn: Project is vulnerable to: GHSA-j9fq-vwqv-2fm2
- Warn: Project is vulnerable to: GHSA-pqw5-jmp5-px4v
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-5q6m-3h65-w53x
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx
- Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw
- Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Score
2.5
/10
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More