Skip to content

Commit

Permalink
apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
romainmenke committed Jul 20, 2023
1 parent 4bb12bc commit 7185f35
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/rules/declaration-property-value-no-unknown/index.js
Expand Up @@ -53,9 +53,7 @@ const rule = (primary, secondaryOptions) => {
return;
}

const ignoreProperties = Array.from(
Object.entries((secondaryOptions && secondaryOptions.ignoreProperties) || {}),
);
const ignoreProperties = Array.from(Object.entries(secondaryOptions?.ignoreProperties ?? {}));

/** @type {(name: string, propValue: string) => boolean} */
const isPropIgnored = (name, value) => {
Expand Down Expand Up @@ -130,7 +128,7 @@ const rule = (primary, secondaryOptions) => {
if (isPropIgnored(prop, value)) return;

// https://github.com/mdn/data/pull/674
// `initial-value` has a incorrect syntax definition.
// `initial-value` has an incorrect syntax definition.
// In reality everything is valid.
if (
/^initial-value$/i.test(prop) &&
Expand Down

0 comments on commit 7185f35

Please sign in to comment.