Skip to content

Fixes #962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Fixes #962

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@
],
"license": "BSD-2-Clause",
"engines": {
"node": "^18.0.0"
"node": ">=18.0.0"
},
"dependencies": {
"cli": "^1.0.1",
2 changes: 1 addition & 1 deletion rules/complex.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

var COMPLEX_SELECTOR_THRESHOLD = 3;
var COMPLEX_SELECTOR_THRESHOLD = 5;

/**
* @param { import("../lib/css-analyzer") } analyzer
2 changes: 1 addition & 1 deletion test/rules/colors.js
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ exports.tests = [
{
css: '.foo { border-color: #000 #000000 rgb(0,0,0) rgba(0,0,0,1) }',
metrics: {
colors: 2
colors: 1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

}
},
];
6 changes: 6 additions & 0 deletions test/rules/complex.js
Original file line number Diff line number Diff line change
@@ -5,6 +5,12 @@ exports.tests = [
complexSelectors: 1
}
},
{
css: 'header li.foo { color: red }',
metrics: {
complexSelectors: 0
}
},
{
css: '.someclass:not([ng-show="gcdmShowSystemNotAvailableMessage()"]){display:none}',
metrics: {
Loading