Skip to content

Commit f0ba77d

Browse files
authored
eslint no-hard-coded-colors allow null (#1886)
1 parent 1f496bf commit f0ba77d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

eslint-rules/lib/rules/no-hard-coded-color.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ module.exports = {
7979
const colorExceptions = ['transparent'];
8080

8181
function isColorException(colorString = '') {
82+
if (colorString === null) {
83+
return true;
84+
}
85+
8286
const lowerCaseColorString = colorString.toLowerCase();
8387
return colorExceptions.indexOf(lowerCaseColorString) !== -1;
8488
}

eslint-rules/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-uilib",
3-
"version": "2.1.4",
3+
"version": "2.1.5",
44
"description": "uilib set of eslint rules",
55
"keywords": [
66
"eslint",

0 commit comments

Comments
 (0)