Installations
npm install eslint-plugin-css-modules-amannn-fork
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=4.0.0
Node Version
7.10.1
NPM Version
4.2.0
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (95.71%)
SCSS (4.1%)
Less (0.19%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
atfzl
Download Statistics
Total Downloads
1,895
Last Day
1
Last Week
5
Last Month
32
Last Year
137
GitHub Statistics
152 Stars
150 Commits
34 Forks
7 Watchers
9 Branches
9 Contributors
Updated on Feb 05, 2025
Package Meta Information
Latest Version
2.8.0-alpha.5
Package Id
eslint-plugin-css-modules-amannn-fork@2.8.0-alpha.5
Size
88.35 kB
NPM Version
4.2.0
Node Version
7.10.1
Total Downloads
Cumulative downloads
Total Downloads
1,895
Last Day
-50%
1
Compared to previous day
Last Week
-61.5%
5
Compared to previous week
Last Month
190.9%
32
Compared to previous month
Last Year
-11%
137
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Peer Dependencies
1
Dev Dependencies
20
eslint-plugin-css-modules
This plugin intends to help you in tracking down problems when you are using css-modules. It tells if you are using a non-existent css/scss/less class in js or if you forgot to use some classes which you declared in css/scss/less.
Rules
css-modules/no-unused-class
: You must use all the classes defined in css/scss/less file.
If you still want to mark a class as used, then use this comment on top of your file
1/* eslint css-modules/no-unused-class: [2, { markAsUsed: ['container'] }] */
where container is the css class that you want to mark as used. Add all such classes in the array.
css-modules/no-undef-class
: You must not use a non existing class.
Installation
npm i --save-dev eslint-plugin-css-modules
Usage:
.eslintrc
1{ 2 "plugins": [ 3 "css-modules" 4 ], 5 "extends": [ 6 "plugin:css-modules/recommended" 7 ] 8}
Screen Shot
1:8 error Unused classes found: container css-modules/no-unused-class
5:17 error Class 'containr' not found css-modules/no-undef-class
10:26 error Class 'foo' not found css-modules/no-undef-class
scss:
1/* .head is global, will not be used in js */ 2:global(.head) { 3 color: green; 4} 5 6.container { 7 width: 116px; 8 9 i { 10 font-size: 2.2rem; 11 } 12 13 .button { 14 padding: 7px 0 0 5px; 15 } 16} 17 18.footer { 19 color: cyan; 20}

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 3/9 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
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
license file not detected
Details
- Warn: project does not have a license file
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
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 25 are checked with a SAST tool
Reason
19 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-832h-xg76-4gv6
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9
- Warn: Project is vulnerable to: GHSA-qh2h-chj9-jffq
- Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-w9mr-4mfr-499f
Score
1.7
/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