Installations
npm install @funboxteam/eslint-plugin-no-only-tests
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
18.15.0
NPM Version
9.5.0
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
funbox
Download Statistics
Total Downloads
176,832
Last Day
159
Last Week
775
Last Month
4,001
Last Year
30,488
GitHub Statistics
10 Stars
60 Commits
2 Forks
12 Watching
2 Branches
10 Contributors
Bundle Size
542.00 B
Minified
363.00 B
Minified + Gzipped
Package Meta Information
Latest Version
5.0.0
Package Id
@funboxteam/eslint-plugin-no-only-tests@5.0.0
Unpacked Size
6.11 kB
Size
2.88 kB
File Count
6
NPM Version
9.5.0
Node Version
18.15.0
Publised On
19 May 2023
Total Downloads
Cumulative downloads
Total Downloads
176,832
Last day
-7%
159
Compared to previous day
Last week
-20.8%
775
Compared to previous week
Last month
5.7%
4,001
Compared to previous month
Last year
-52.8%
30,488
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
3
@funboxteam/eslint-plugin-no-only-tests
Disallow the use of describe.only()
and it.only()
.
Rationale
When developers fix tests they may make the process easier by filtering tests using method only
on it
& describe
.
However, such filters should not be in the repo when the project is running on CI.
So, we add this rule to our ESLint config to check the existence of only
in the tests files. And we run linter using precommit-hook, which make it possible to prevent committing
when only
does exist in the code.
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install the plugin:
$ npm install @funboxteam/eslint-plugin-no-only-tests --save-dev
Usage
Add @funboxteam/eslint-plugin-no-only-tests
to the plugins
section of your .eslintrc
configuration file.
You can omit the eslint-plugin-
prefix:
1{ 2 "plugins": [ 3 "@funboxteam/no-only-tests" 4 ] 5}
Then configure the rule under the rules
section.
1{ 2 "rules": { 3 "@funboxteam/no-only-tests/no-only": 2 4 } 5}
![Empty State](/_next/static/media/empty.e5fae2e5.png)
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
dependency not pinned by hash detected -- score normalized to 2
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/funbox/eslint-plugin-no-only-tests/node.js.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/funbox/eslint-plugin-no-only-tests/node.js.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/funbox/eslint-plugin-no-only-tests/publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/funbox/eslint-plugin-no-only-tests/publish.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/node.js.yml:30
- Info: 0 out of 4 GitHub-owned GitHubAction dependencies pinned
- Info: 2 out of 3 npmCommand dependencies pinned
Reason
Found 1/7 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/node.js.yml:1
- Warn: no topLevel permission defined: .github/workflows/publish.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
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
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 30 are checked with a SAST tool
Reason
12 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Score
2.7
/10
Last Scanned on 2025-01-27
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