Socket
Socket
Sign inDemoInstall

stylelint-declaration-strict-value

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylelint-declaration-strict-value - npm Package Compare versions

Comparing version 1.9.2 to 1.10.0

dist/index.modern.mjs

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# [1.10.0](https://github.com/AndyOGo/stylelint-declaration-strict-value/compare/v1.9.2...v1.10.0) (2024-01-05)
### Features
* support stylelint v16 ([cf40d65](https://github.com/AndyOGo/stylelint-declaration-strict-value/commit/cf40d658970861282396f17a11efbdbfe768f43d))
## [1.9.2](https://github.com/AndyOGo/stylelint-declaration-strict-value/compare/v1.9.1...v1.9.2) (2023-02-16)

@@ -2,0 +9,0 @@

2

dist/defaults.d.ts

@@ -1,2 +0,2 @@

import type { Node, Root } from 'stylelint/node_modules/postcss';
import type { Node, Root } from 'postcss';
/**

@@ -3,0 +3,0 @@ * Rule Name.

@@ -1,2 +0,2 @@

import { Rule } from 'stylelint';
import stylelint from 'stylelint';
import { customExpected, expected, failedToFix } from './lib/validation';

@@ -9,12 +9,4 @@ import { ruleName } from './defaults';

};
declare const declarationStrictValuePlugin: {
default?: {
ruleName: string;
rule: Rule<any, any>;
} | undefined;
} | {
ruleName: string;
rule: Rule<any, any>;
};
declare const declarationStrictValuePlugin: stylelint.Plugin;
export default declarationStrictValuePlugin;
export { ruleName, messages };

@@ -1,2 +0,2 @@

import e from"stylelint";import n from"shortcss";import t from"shortcss/lib/list";import r from"css-values";import o from"path";const s="scale-unlimited/declaration-strict-value",i=(e,n)=>"object"==typeof e&&Object.hasOwnProperty.call(e,n),l={ignoreVariables:!0,ignoreFunctions:!0,ignoreKeywords:null,ignoreValues:null,expandShorthand:!1,recurseLonghand:!1,severity:"error",message:void 0,disableFix:!1,autoFixFunc:null};function a(e){const n=typeof e;return"string"===n||"number"===n}function u(e){return a(e)||Array.isArray(e)&&e.every(e=>a(e))}function c(e){return!("object"!=typeof e||!e)&&Object.keys(e).every(n=>u(e[n]))}function f(e){return!("object"!=typeof e||!e)&&Object.keys(e).every(n=>"boolean"==typeof e[n])}function p(e){if("object"!=typeof e)return!1;const n=Object.keys(l);return!(!Object.keys(e).every(e=>n.indexOf(e)>-1)||"ignoreVariables"in e&&"boolean"!=typeof e.ignoreVariables&&!f(e.ignoreVariables)&&null!==e.ignoreVariables||"ignoreFunctions"in e&&"boolean"!=typeof e.ignoreFunctions&&!f(e.ignoreFunctions)&&null!==e.ignoreFunctions||"severity"in e&&"string"!=typeof e.severity&&null!==e.severity||"ignoreKeywords"in e&&!u(e.ignoreKeywords)&&!c(e.ignoreKeywords)||"ignoreValues"in e&&!u(e.ignoreValues)&&!c(e.ignoreValues)||"expandShorthand"in e&&"boolean"!=typeof e.expandShorthand&&null!==e.expandShorthand||"recurseLonghand"in e&&"boolean"!=typeof e.recurseLonghand&&null!==e.recurseLonghand||"message"in e&&"string"!=typeof e.message&&null!==e.message||"disableFix"in e&&"boolean"!=typeof e.disableFix&&null!==e.disableFix||"autoFixFunc"in e&&"function"!=typeof e.autoFixFunc&&"string"!=typeof e.autoFixFunc&&null!==e.autoFixFunc)}function g(e){let n;if(Array.isArray(e)){const t=e.pop();n=e.length?`${e.join(", ")} or ${t}`:t}else n=e;return n}function y(e,n){return"boolean"==typeof e?e:"object"==typeof e&&e&&{}.hasOwnProperty.call(e,n)?e[n]:!!e}function d(e,n){if(!e)return null;let t=e;return i(t,n)?t=t[n]:i(t,"")&&(t=t[""]),Array.isArray(t)?t:[t]}function h(e,n){if(!e)return null;let t=e;return i(t,n)?t=t[n]:i(t,"")&&(t=t[""]),Array.isArray(t)?t:[t]}const{utils:x}=e,b=x.ruleMessages(s,{expected:function(e,n,t){return`Expected ${e} for "${n}" of "${t}"`},customExpected:function(e,n,t,r){return r.replace("${types}",e).replace("${value}",n).replace("${property}",t)},failedToFix:function(e,n,t){return e&&("string"==typeof e||e instanceof Error)?"string"==typeof e?e:e.message:`Property "${t}" with value "${n}" can't be autofixed`}}),m=/^(?:@|\$|--).+$/,F=/^-?(?:@.+|(?:(?:[a-zA-Z_-]|[^\x20-\x7F])+(?:[a-zA-Z0-9_-]|[^\x20-\x7F])*\.)?\$.+|var\(\s*--[\s\S]+\))$/,v=/^(?!var\(\s*--)[\s\S]+\([\s\S]*\)$/,w=/^\/(.*)\/([a-zA-Z]*)$/,$=/color/,V=e=>w.test(e),j=e=>{const[n,t]=(e=>e.match(w).slice(1))(e);return new RegExp(n,t)},A=e=>V(""+e)?j(""+e):new RegExp(`^${e}$`),E=(e,i,a={})=>(c,f)=>{if(f&&f.stylelint&&f.stylelint.customMessages&&f.stylelint.customMessages[s]&&delete f.stylelint.customMessages[s],!x.validateOptions(f,s,{actual:e,possible:u},{actual:i,possible:p,optional:!0}))return;Array.isArray(e)||(e=[e]);const w={...l,...i},{ignoreVariables:E,ignoreFunctions:O,ignoreKeywords:k,ignoreValues:S,message:K,disableFix:R,autoFixFunc:L,expandShorthand:P,recurseLonghand:M}=w,N=function(e,n,t){if("function"==typeof e)return e;if("string"==typeof e){let n;try{n=require.resolve(e)}catch(t){n=require.resolve(o.join(process.cwd(),e))}return require(n)}return!n&&t&&console.warn(`No \`autoFix\` function provided, consider using \`disableFix\` for "${s}"`),null}(L,R,a.fix),q=k?{}:null,z=S?{}:null;let Z;if(E){const e=[];c.walkAtRules("value",n=>{const{params:t}=n,r=t.split(":")[0].trim();e.push(r)}),Z=new RegExp(`^-?(:?${e.join("|")})$`)}e.forEach(e=>{let o=e;function i(n,t,o,i=!1){const{value:l,prop:u}=n,p=o||l;let m=!1,V=!1,j=!1,L=!1;if(E&&y(E,e)&&(m=F.test(p)||Z.test(p)),O&&!m&&y(O,e)&&(V=v.test(p)),i&&(!E||E&&!m)&&(!O||O&&!V)&&!0!==((e,n)=>$.test(e)&&"transparent"===n||F.test(n)||v.test(n)||r(e,n))(t,o))return!1;if(k&&(!m||!V)){let n=q[e];if(!n){const t=d(k,e);t&&(n=new RegExp(`^${t.join("$|^")}$`),q[e]=n)}n&&(j=n.test(p))}if(S&&(!m||!V||!j)){let n=z[e];if(!n){const t=h(S,e);t&&(n=t.map(A),z[e]=n)}n&&(L=n.filter(e=>e.test(p)).length>0)}if(!(m||V||j||L)){const r=function(e,n){const{ignoreVariables:t,ignoreFunctions:r,ignoreKeywords:o,ignoreValues:s}=e,i=[];return t&&i.push("variable"),r&&i.push("function"),o&&d(o,n)&&i.push("keyword"),-1===i.indexOf("keyword")&&s&&h(s,n)&&i.push("keyword"),i}(w,e);if(a.fix&&!R&&N)try{const e=N(n,{validVar:m,validFunc:V,validKeyword:j,validValue:L,longhandProp:t,longhandValue:o},c,w);e&&(n.value=e)}catch(e){const{raws:t}=n,r=n.source.start;x.report({ruleName:s,result:f,node:n,line:r.line,column:r.column+u.length+t.between.length,message:b.failedToFix(e,p,u)})}else{const{raws:e}=n,t=n.source.start;x.report({ruleName:s,result:f,node:n,line:t.line,column:t.column+u.length+e.between.length,message:K?b.customExpected(g(r),p,u,K):b.expected(g(r),p,u)})}return!0}return!1}V(o)&&(o=j(o)),c.walkDecls(function(e){const{value:r,prop:s}=e;if(m.test(s))return;const l=P&&n.isShorthand(s);if(s===o||!l&&o instanceof RegExp&&o.test(s)){const n=t.space(r);if(n.length>1){let t=!1;n.forEach(n=>{t||(t=i(e,s,n))})}else i(e)}else if(l){const t=n.expand(s,r,M);let l=!1;Object.keys(t).forEach(n=>{const r=t[n];!l&&(n===o||o instanceof RegExp&&o.test(n))&&(l=i(e,n,r,!0))})}})})};E.primaryOptionArray=!0,E.ruleName=s,E.messages=b;const O=e.createPlugin(s,E);export default O;export{b as messages,s as ruleName};
import e from"stylelint";import n from"shortcss";import t from"shortcss/lib/list";import r from"css-values";import o from"path";const s="scale-unlimited/declaration-strict-value",i=(e,n)=>"object"==typeof e&&Object.hasOwnProperty.call(e,n),a={ignoreVariables:!0,ignoreFunctions:!0,ignoreKeywords:null,ignoreValues:null,expandShorthand:!1,recurseLonghand:!1,severity:"error",message:void 0,disableFix:!1,autoFixFunc:null};function l(e){const n=typeof e;return"string"===n||"number"===n}function u(e){return l(e)||Array.isArray(e)&&e.every(e=>l(e))}function c(e){return!("object"!=typeof e||!e)&&Object.keys(e).every(n=>u(e[n]))}function f(e){return!("object"!=typeof e||!e)&&Object.keys(e).every(n=>"boolean"==typeof e[n])}function p(e){if("object"!=typeof e)return!1;const n=Object.keys(a);return!(!Object.keys(e).every(e=>n.indexOf(e)>-1)||"ignoreVariables"in e&&"boolean"!=typeof e.ignoreVariables&&!f(e.ignoreVariables)&&null!==e.ignoreVariables||"ignoreFunctions"in e&&"boolean"!=typeof e.ignoreFunctions&&!f(e.ignoreFunctions)&&null!==e.ignoreFunctions||"severity"in e&&"string"!=typeof e.severity&&null!==e.severity||"ignoreKeywords"in e&&!u(e.ignoreKeywords)&&!c(e.ignoreKeywords)||"ignoreValues"in e&&!u(e.ignoreValues)&&!c(e.ignoreValues)||"expandShorthand"in e&&"boolean"!=typeof e.expandShorthand&&null!==e.expandShorthand||"recurseLonghand"in e&&"boolean"!=typeof e.recurseLonghand&&null!==e.recurseLonghand||"message"in e&&"string"!=typeof e.message&&null!==e.message||"disableFix"in e&&"boolean"!=typeof e.disableFix&&null!==e.disableFix||"autoFixFunc"in e&&"function"!=typeof e.autoFixFunc&&"string"!=typeof e.autoFixFunc&&null!==e.autoFixFunc)}function g(e){let n;if(Array.isArray(e)){const t=e.pop();n=e.length?`${e.join(", ")} or ${t}`:t}else n=e;return n}function y(e,n){return"boolean"==typeof e?e:"object"==typeof e&&e&&{}.hasOwnProperty.call(e,n)?e[n]:!!e}function d(e,n){if(!e)return null;let t=e;return i(t,n)?t=t[n]:i(t,"")&&(t=t[""]),Array.isArray(t)?t:[t]}function h(e,n){if(!e)return null;let t=e;return i(t,n)?t=t[n]:i(t,"")&&(t=t[""]),Array.isArray(t)?t:[t]}const{utils:x}=e,b=x.ruleMessages(s,{expected:function(e,n,t){return`Expected ${e} for "${n}" of "${t}"`},customExpected:function(e,n,t,r){return r.replace("${types}",e).replace("${value}",n).replace("${property}",t)},failedToFix:function(e,n,t){return e&&("string"==typeof e||e instanceof Error)?"string"==typeof e?e:e.message:`Property "${t}" with value "${n}" can't be autofixed`}}),m=/^(?:@|\$|--).+$/,F=/^-?(?:@.+|(?:(?:[a-zA-Z_-]|[^\x20-\x7F])+(?:[a-zA-Z0-9_-]|[^\x20-\x7F])*\.)?\$.+|var\(\s*--[\s\S]+\))$/,v=/^(?!var\(\s*--)[\s\S]+\([\s\S]*\)$/,$=/^\/(.*)\/([a-zA-Z]*)$/,w=/color/,V=e=>$.test(e),j=e=>{const[n,t]=(e=>e.match($).slice(1))(e);return new RegExp(n,t)},A=e=>V(`${e}`)?j(`${e}`):new RegExp(`^${e}$`),E=(e,i,l={})=>(c,f)=>{if(f&&f.stylelint&&f.stylelint.customMessages&&f.stylelint.customMessages[s]&&delete f.stylelint.customMessages[s],!x.validateOptions(f,s,{actual:e,possible:u},{actual:i,possible:p,optional:!0}))return;Array.isArray(e)||(e=[e]);const $={...a,...i},{ignoreVariables:E,ignoreFunctions:O,ignoreKeywords:k,ignoreValues:S,message:K,disableFix:R,autoFixFunc:L,expandShorthand:P,recurseLonghand:M}=$,N=function(e,n,t){if("function"==typeof e)return e;if("string"==typeof e){let n;try{n=require.resolve(e)}catch(t){n=require.resolve(o.join(process.cwd(),e))}return require(n)}return!n&&t&&console.warn(`No \`autoFix\` function provided, consider using \`disableFix\` for "${s}"`),null}(L,R,l.fix),q=k?{}:null,z=S?{}:null;let Z;if(E){const e=[];c.walkAtRules("value",n=>{const{params:t}=n,r=t.split(":")[0].trim();e.push(r)}),Z=new RegExp(`^-?(:?${e.join("|")})$`)}e.forEach(e=>{let o=e;function i(n,t,o,i=!1){const{value:a,prop:u}=n,p=o||a;let m=!1,V=!1,j=!1,L=!1;if(E&&y(E,e)&&(m=F.test(p)||Z.test(p)),O&&!m&&y(O,e)&&(V=v.test(p)),i&&(!E||E&&!m)&&(!O||O&&!V)&&!0!==((e,n)=>w.test(e)&&"transparent"===n||F.test(n)||v.test(n)||r(e,n))(t,o))return!1;if(k&&(!m||!V)){let n=q[e];if(!n){const t=d(k,e);t&&(n=new RegExp(`^${t.join("$|^")}$`),q[e]=n)}n&&(j=n.test(p))}if(S&&(!m||!V||!j)){let n=z[e];if(!n){const t=h(S,e);t&&(n=t.map(A),z[e]=n)}n&&(L=n.filter(e=>e.test(p)).length>0)}if(!(m||V||j||L)){const r=function(e,n){const{ignoreVariables:t,ignoreFunctions:r,ignoreKeywords:o,ignoreValues:s}=e,i=[];return t&&i.push("variable"),r&&i.push("function"),o&&d(o,n)&&i.push("keyword"),-1===i.indexOf("keyword")&&s&&h(s,n)&&i.push("keyword"),i}($,e);if(l.fix&&!R&&N)try{const e=N(n,{validVar:m,validFunc:V,validKeyword:j,validValue:L,longhandProp:t,longhandValue:o},c,$);e&&(n.value=e)}catch(e){const{raws:t}=n,r=n.source.start;x.report({ruleName:s,result:f,node:n,line:r.line,column:r.column+u.length+t.between.length,message:b.failedToFix(e,p,u)})}else{const{raws:e}=n,t=n.source.start;x.report({ruleName:s,result:f,node:n,line:t.line,column:t.column+u.length+e.between.length,message:K?b.customExpected(g(r),p,u,K):b.expected(g(r),p,u)})}return!0}return!1}V(o)&&(o=j(o)),c.walkDecls(function(e){const{value:r,prop:s}=e;if(m.test(s))return;const a=P&&n.isShorthand(s);if(s===o||!a&&o instanceof RegExp&&o.test(s)){const n=t.space(r);if(n.length>1){let t=!1;n.forEach(n=>{t||(t=i(e,s,n))})}else i(e)}else if(a){const t=n.expand(s,r,M);let a=!1;Object.keys(t).forEach(n=>{const r=t[n];!a&&(n===o||o instanceof RegExp&&o.test(n))&&(a=i(e,n,r,!0))})}})})};E.primaryOptionArray=!0,E.ruleName=s,E.messages=b;const O=e.createPlugin(s,E);export{O as default,b as messages,s as ruleName};
//# sourceMappingURL=index.esm.js.map

@@ -1,2 +0,2 @@

function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var n=e(require("stylelint")),t=e(require("shortcss")),r=e(require("shortcss/lib/list")),o=e(require("css-values")),s=e(require("path"));const i="scale-unlimited/declaration-strict-value",a=(e,n)=>"object"==typeof e&&Object.hasOwnProperty.call(e,n),l={ignoreVariables:!0,ignoreFunctions:!0,ignoreKeywords:null,ignoreValues:null,expandShorthand:!1,recurseLonghand:!1,severity:"error",message:void 0,disableFix:!1,autoFixFunc:null};function u(e){const n=typeof e;return"string"===n||"number"===n}function c(e){return u(e)||Array.isArray(e)&&e.every(e=>u(e))}function f(e){return!("object"!=typeof e||!e)&&Object.keys(e).every(n=>c(e[n]))}function p(e){return!("object"!=typeof e||!e)&&Object.keys(e).every(n=>"boolean"==typeof e[n])}function g(e){if("object"!=typeof e)return!1;const n=Object.keys(l);return!(!Object.keys(e).every(e=>n.indexOf(e)>-1)||"ignoreVariables"in e&&"boolean"!=typeof e.ignoreVariables&&!p(e.ignoreVariables)&&null!==e.ignoreVariables||"ignoreFunctions"in e&&"boolean"!=typeof e.ignoreFunctions&&!p(e.ignoreFunctions)&&null!==e.ignoreFunctions||"severity"in e&&"string"!=typeof e.severity&&null!==e.severity||"ignoreKeywords"in e&&!c(e.ignoreKeywords)&&!f(e.ignoreKeywords)||"ignoreValues"in e&&!c(e.ignoreValues)&&!f(e.ignoreValues)||"expandShorthand"in e&&"boolean"!=typeof e.expandShorthand&&null!==e.expandShorthand||"recurseLonghand"in e&&"boolean"!=typeof e.recurseLonghand&&null!==e.recurseLonghand||"message"in e&&"string"!=typeof e.message&&null!==e.message||"disableFix"in e&&"boolean"!=typeof e.disableFix&&null!==e.disableFix||"autoFixFunc"in e&&"function"!=typeof e.autoFixFunc&&"string"!=typeof e.autoFixFunc&&null!==e.autoFixFunc)}function y(e){let n;if(Array.isArray(e)){const t=e.pop();n=e.length?`${e.join(", ")} or ${t}`:t}else n=e;return n}function d(e,n){return"boolean"==typeof e?e:"object"==typeof e&&e&&{}.hasOwnProperty.call(e,n)?e[n]:!!e}function x(e,n){if(!e)return null;let t=e;return a(t,n)?t=t[n]:a(t,"")&&(t=t[""]),Array.isArray(t)?t:[t]}function h(e,n){if(!e)return null;let t=e;return a(t,n)?t=t[n]:a(t,"")&&(t=t[""]),Array.isArray(t)?t:[t]}const{utils:b}=n,F=b.ruleMessages(i,{expected:function(e,n,t){return`Expected ${e} for "${n}" of "${t}"`},customExpected:function(e,n,t,r){return r.replace("${types}",e).replace("${value}",n).replace("${property}",t)},failedToFix:function(e,n,t){return e&&("string"==typeof e||e instanceof Error)?"string"==typeof e?e:e.message:`Property "${t}" with value "${n}" can't be autofixed`}}),m=/^(?:@|\$|--).+$/,v=/^-?(?:@.+|(?:(?:[a-zA-Z_-]|[^\x20-\x7F])+(?:[a-zA-Z0-9_-]|[^\x20-\x7F])*\.)?\$.+|var\(\s*--[\s\S]+\))$/,w=/^(?!var\(\s*--)[\s\S]+\([\s\S]*\)$/,$=/^\/(.*)\/([a-zA-Z]*)$/,j=/color/,V=e=>$.test(e),A=e=>{const[n,t]=(e=>e.match($).slice(1))(e);return new RegExp(n,t)},E=e=>V(""+e)?A(""+e):new RegExp(`^${e}$`),O=(e,n,a={})=>(u,f)=>{if(f&&f.stylelint&&f.stylelint.customMessages&&f.stylelint.customMessages[i]&&delete f.stylelint.customMessages[i],!b.validateOptions(f,i,{actual:e,possible:c},{actual:n,possible:g,optional:!0}))return;Array.isArray(e)||(e=[e]);const p={...l,...n},{ignoreVariables:$,ignoreFunctions:O,ignoreKeywords:k,ignoreValues:S,message:q,disableFix:K,autoFixFunc:R,expandShorthand:L,recurseLonghand:N}=p,P=function(e,n,t){if("function"==typeof e)return e;if("string"==typeof e){let n;try{n=require.resolve(e)}catch(t){n=require.resolve(s.join(process.cwd(),e))}return require(n)}return!n&&t&&console.warn(`No \`autoFix\` function provided, consider using \`disableFix\` for "${i}"`),null}(R,K,a.fix),M=k?{}:null,z=S?{}:null;let Z;if($){const e=[];u.walkAtRules("value",n=>{const{params:t}=n,r=t.split(":")[0].trim();e.push(r)}),Z=new RegExp(`^-?(:?${e.join("|")})$`)}e.forEach(e=>{let n=e;function s(n,t,r,s=!1){const{value:l,prop:c}=n,g=r||l;let m=!1,V=!1,A=!1,R=!1;if($&&d($,e)&&(m=v.test(g)||Z.test(g)),O&&!m&&d(O,e)&&(V=w.test(g)),s&&(!$||$&&!m)&&(!O||O&&!V)&&!0!==((e,n)=>j.test(e)&&"transparent"===n||v.test(n)||w.test(n)||o(e,n))(t,r))return!1;if(k&&(!m||!V)){let n=M[e];if(!n){const t=x(k,e);t&&(n=new RegExp(`^${t.join("$|^")}$`),M[e]=n)}n&&(A=n.test(g))}if(S&&(!m||!V||!A)){let n=z[e];if(!n){const t=h(S,e);t&&(n=t.map(E),z[e]=n)}n&&(R=n.filter(e=>e.test(g)).length>0)}if(!(m||V||A||R)){const o=function(e,n){const{ignoreVariables:t,ignoreFunctions:r,ignoreKeywords:o,ignoreValues:s}=e,i=[];return t&&i.push("variable"),r&&i.push("function"),o&&x(o,n)&&i.push("keyword"),-1===i.indexOf("keyword")&&s&&h(s,n)&&i.push("keyword"),i}(p,e);if(a.fix&&!K&&P)try{const e=P(n,{validVar:m,validFunc:V,validKeyword:A,validValue:R,longhandProp:t,longhandValue:r},u,p);e&&(n.value=e)}catch(e){const{raws:t}=n,r=n.source.start;b.report({ruleName:i,result:f,node:n,line:r.line,column:r.column+c.length+t.between.length,message:F.failedToFix(e,g,c)})}else{const{raws:e}=n,t=n.source.start;b.report({ruleName:i,result:f,node:n,line:t.line,column:t.column+c.length+e.between.length,message:q?F.customExpected(y(o),g,c,q):F.expected(y(o),g,c)})}return!0}return!1}V(n)&&(n=A(n)),u.walkDecls(function(e){const{value:o,prop:i}=e;if(m.test(i))return;const a=L&&t.isShorthand(i);if(i===n||!a&&n instanceof RegExp&&n.test(i)){const n=r.space(o);if(n.length>1){let t=!1;n.forEach(n=>{t||(t=s(e,i,n))})}else s(e)}else if(a){const r=t.expand(i,o,N);let a=!1;Object.keys(r).forEach(t=>{const o=r[t];!a&&(t===n||n instanceof RegExp&&n.test(t))&&(a=s(e,t,o,!0))})}})})};O.primaryOptionArray=!0,O.ruleName=i,O.messages=F;const k=n.createPlugin(i,O);exports.default=k,exports.messages=F,exports.ruleName=i;
var e=require("stylelint"),n=require("shortcss"),t=require("shortcss/lib/list"),r=require("css-values"),o=require("path");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=/*#__PURE__*/s(e),a=/*#__PURE__*/s(n),l=/*#__PURE__*/s(t),u=/*#__PURE__*/s(r),c=/*#__PURE__*/s(o);const f="scale-unlimited/declaration-strict-value",p=(e,n)=>"object"==typeof e&&Object.hasOwnProperty.call(e,n),d={ignoreVariables:!0,ignoreFunctions:!0,ignoreKeywords:null,ignoreValues:null,expandShorthand:!1,recurseLonghand:!1,severity:"error",message:void 0,disableFix:!1,autoFixFunc:null};function g(e){const n=typeof e;return"string"===n||"number"===n}function y(e){return g(e)||Array.isArray(e)&&e.every(e=>g(e))}function x(e){return!("object"!=typeof e||!e)&&Object.keys(e).every(n=>y(e[n]))}function h(e){return!("object"!=typeof e||!e)&&Object.keys(e).every(n=>"boolean"==typeof e[n])}function b(e){if("object"!=typeof e)return!1;const n=Object.keys(d);return!(!Object.keys(e).every(e=>n.indexOf(e)>-1)||"ignoreVariables"in e&&"boolean"!=typeof e.ignoreVariables&&!h(e.ignoreVariables)&&null!==e.ignoreVariables||"ignoreFunctions"in e&&"boolean"!=typeof e.ignoreFunctions&&!h(e.ignoreFunctions)&&null!==e.ignoreFunctions||"severity"in e&&"string"!=typeof e.severity&&null!==e.severity||"ignoreKeywords"in e&&!y(e.ignoreKeywords)&&!x(e.ignoreKeywords)||"ignoreValues"in e&&!y(e.ignoreValues)&&!x(e.ignoreValues)||"expandShorthand"in e&&"boolean"!=typeof e.expandShorthand&&null!==e.expandShorthand||"recurseLonghand"in e&&"boolean"!=typeof e.recurseLonghand&&null!==e.recurseLonghand||"message"in e&&"string"!=typeof e.message&&null!==e.message||"disableFix"in e&&"boolean"!=typeof e.disableFix&&null!==e.disableFix||"autoFixFunc"in e&&"function"!=typeof e.autoFixFunc&&"string"!=typeof e.autoFixFunc&&null!==e.autoFixFunc)}function F(e){let n;if(Array.isArray(e)){const t=e.pop();n=e.length?`${e.join(", ")} or ${t}`:t}else n=e;return n}function m(e,n){return"boolean"==typeof e?e:"object"==typeof e&&e&&{}.hasOwnProperty.call(e,n)?e[n]:!!e}function v(e,n){if(!e)return null;let t=e;return p(t,n)?t=t[n]:p(t,"")&&(t=t[""]),Array.isArray(t)?t:[t]}function $(e,n){if(!e)return null;let t=e;return p(t,n)?t=t[n]:p(t,"")&&(t=t[""]),Array.isArray(t)?t:[t]}const{utils:w}=i.default,j=w.ruleMessages(f,{expected:function(e,n,t){return`Expected ${e} for "${n}" of "${t}"`},customExpected:function(e,n,t,r){return r.replace("${types}",e).replace("${value}",n).replace("${property}",t)},failedToFix:function(e,n,t){return e&&("string"==typeof e||e instanceof Error)?"string"==typeof e?e:e.message:`Property "${t}" with value "${n}" can't be autofixed`}}),V=/^(?:@|\$|--).+$/,A=/^-?(?:@.+|(?:(?:[a-zA-Z_-]|[^\x20-\x7F])+(?:[a-zA-Z0-9_-]|[^\x20-\x7F])*\.)?\$.+|var\(\s*--[\s\S]+\))$/,E=/^(?!var\(\s*--)[\s\S]+\([\s\S]*\)$/,O=/^\/(.*)\/([a-zA-Z]*)$/,k=/color/,S=e=>O.test(e),q=e=>{const[n,t]=(e=>e.match(O).slice(1))(e);return new RegExp(n,t)},K=e=>S(`${e}`)?q(`${e}`):new RegExp(`^${e}$`),R=(e,n,t={})=>(r,o)=>{if(o&&o.stylelint&&o.stylelint.customMessages&&o.stylelint.customMessages[f]&&delete o.stylelint.customMessages[f],!w.validateOptions(o,f,{actual:e,possible:y},{actual:n,possible:b,optional:!0}))return;Array.isArray(e)||(e=[e]);const s={...d,...n},{ignoreVariables:i,ignoreFunctions:p,ignoreKeywords:g,ignoreValues:x,message:h,disableFix:O,autoFixFunc:R,expandShorthand:L,recurseLonghand:N}=s,P=function(e,n,t){if("function"==typeof e)return e;if("string"==typeof e){let n;try{n=require.resolve(e)}catch(t){n=require.resolve(c.default.join(process.cwd(),e))}return require(n)}return!n&&t&&console.warn(`No \`autoFix\` function provided, consider using \`disableFix\` for "${f}"`),null}(R,O,t.fix),M=g?{}:null,z=x?{}:null;let Z;if(i){const e=[];r.walkAtRules("value",n=>{const{params:t}=n,r=t.split(":")[0].trim();e.push(r)}),Z=new RegExp(`^-?(:?${e.join("|")})$`)}e.forEach(e=>{let n=e;function c(n,a,l,c=!1){const{value:d,prop:y}=n,b=l||d;let V=!1,S=!1,q=!1,R=!1;if(i&&m(i,e)&&(V=A.test(b)||Z.test(b)),p&&!V&&m(p,e)&&(S=E.test(b)),c&&(!i||i&&!V)&&(!p||p&&!S)&&!0!==((e,n)=>k.test(e)&&"transparent"===n||A.test(n)||E.test(n)||u.default(e,n))(a,l))return!1;if(g&&(!V||!S)){let n=M[e];if(!n){const t=v(g,e);t&&(n=new RegExp(`^${t.join("$|^")}$`),M[e]=n)}n&&(q=n.test(b))}if(x&&(!V||!S||!q)){let n=z[e];if(!n){const t=$(x,e);t&&(n=t.map(K),z[e]=n)}n&&(R=n.filter(e=>e.test(b)).length>0)}if(!(V||S||q||R)){const i=function(e,n){const{ignoreVariables:t,ignoreFunctions:r,ignoreKeywords:o,ignoreValues:s}=e,i=[];return t&&i.push("variable"),r&&i.push("function"),o&&v(o,n)&&i.push("keyword"),-1===i.indexOf("keyword")&&s&&$(s,n)&&i.push("keyword"),i}(s,e);if(t.fix&&!O&&P)try{const e=P(n,{validVar:V,validFunc:S,validKeyword:q,validValue:R,longhandProp:a,longhandValue:l},r,s);e&&(n.value=e)}catch(e){const{raws:t}=n,r=n.source.start;w.report({ruleName:f,result:o,node:n,line:r.line,column:r.column+y.length+t.between.length,message:j.failedToFix(e,b,y)})}else{const{raws:e}=n,t=n.source.start;w.report({ruleName:f,result:o,node:n,line:t.line,column:t.column+y.length+e.between.length,message:h?j.customExpected(F(i),b,y,h):j.expected(F(i),b,y)})}return!0}return!1}S(n)&&(n=q(n)),r.walkDecls(function(e){const{value:t,prop:r}=e;if(V.test(r))return;const o=L&&a.default.isShorthand(r);if(r===n||!o&&n instanceof RegExp&&n.test(r)){const n=l.default.space(t);if(n.length>1){let t=!1;n.forEach(n=>{t||(t=c(e,r,n))})}else c(e)}else if(o){const o=a.default.expand(r,t,N);let s=!1;Object.keys(o).forEach(t=>{const r=o[t];!s&&(t===n||n instanceof RegExp&&n.test(t))&&(s=c(e,t,r,!0))})}})})};R.primaryOptionArray=!0,R.ruleName=f,R.messages=j;const L=i.default.createPlugin(f,R);exports.default=L,exports.messages=j,exports.ruleName=f;
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("stylelint"),require("shortcss"),require("shortcss/lib/list"),require("css-values"),require("path")):"function"==typeof define&&define.amd?define(["exports","stylelint","shortcss","shortcss/lib/list","css-values","path"],t):t((e=e||self).stylelintDeclarationStrictValue={},e.stylelint,e.shortcss,e.list,e.cssValues,e.path)}(this,function(e,t,n,r,o,s){t=t&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t,n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n,r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r,o=o&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o,s=s&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s;const i="scale-unlimited/declaration-strict-value",l=(e,t)=>"object"==typeof e&&Object.hasOwnProperty.call(e,t),a={ignoreVariables:!0,ignoreFunctions:!0,ignoreKeywords:null,ignoreValues:null,expandShorthand:!1,recurseLonghand:!1,severity:"error",message:void 0,disableFix:!1,autoFixFunc:null};function u(e){const t=typeof e;return"string"===t||"number"===t}function c(e){return u(e)||Array.isArray(e)&&e.every(e=>u(e))}function f(e){return!("object"!=typeof e||!e)&&Object.keys(e).every(t=>c(e[t]))}function p(e){return!("object"!=typeof e||!e)&&Object.keys(e).every(t=>"boolean"==typeof e[t])}function y(e){if("object"!=typeof e)return!1;const t=Object.keys(a);return!(!Object.keys(e).every(e=>t.indexOf(e)>-1)||"ignoreVariables"in e&&"boolean"!=typeof e.ignoreVariables&&!p(e.ignoreVariables)&&null!==e.ignoreVariables||"ignoreFunctions"in e&&"boolean"!=typeof e.ignoreFunctions&&!p(e.ignoreFunctions)&&null!==e.ignoreFunctions||"severity"in e&&"string"!=typeof e.severity&&null!==e.severity||"ignoreKeywords"in e&&!c(e.ignoreKeywords)&&!f(e.ignoreKeywords)||"ignoreValues"in e&&!c(e.ignoreValues)&&!f(e.ignoreValues)||"expandShorthand"in e&&"boolean"!=typeof e.expandShorthand&&null!==e.expandShorthand||"recurseLonghand"in e&&"boolean"!=typeof e.recurseLonghand&&null!==e.recurseLonghand||"message"in e&&"string"!=typeof e.message&&null!==e.message||"disableFix"in e&&"boolean"!=typeof e.disableFix&&null!==e.disableFix||"autoFixFunc"in e&&"function"!=typeof e.autoFixFunc&&"string"!=typeof e.autoFixFunc&&null!==e.autoFixFunc)}function d(e){let t;if(Array.isArray(e)){const n=e.pop();t=e.length?`${e.join(", ")} or ${n}`:n}else t=e;return t}function g(e,t){return"boolean"==typeof e?e:"object"==typeof e&&e&&{}.hasOwnProperty.call(e,t)?e[t]:!!e}function h(e,t){if(!e)return null;let n=e;return l(n,t)?n=n[t]:l(n,"")&&(n=n[""]),Array.isArray(n)?n:[n]}function b(e,t){if(!e)return null;let n=e;return l(n,t)?n=n[t]:l(n,"")&&(n=n[""]),Array.isArray(n)?n:[n]}const{utils:x}=t,m=x.ruleMessages(i,{expected:function(e,t,n){return`Expected ${e} for "${t}" of "${n}"`},customExpected:function(e,t,n,r){return r.replace("${types}",e).replace("${value}",t).replace("${property}",n)},failedToFix:function(e,t,n){return e&&("string"==typeof e||e instanceof Error)?"string"==typeof e?e:e.message:`Property "${n}" with value "${t}" can't be autofixed`}}),F=/^(?:@|\$|--).+$/,w=/^-?(?:@.+|(?:(?:[a-zA-Z_-]|[^\x20-\x7F])+(?:[a-zA-Z0-9_-]|[^\x20-\x7F])*\.)?\$.+|var\(\s*--[\s\S]+\))$/,v=/^(?!var\(\s*--)[\s\S]+\([\s\S]*\)$/,$=/^\/(.*)\/([a-zA-Z]*)$/,O=/color/,j=e=>$.test(e),V=e=>{const[t,n]=(e=>e.match($).slice(1))(e);return new RegExp(t,n)},A=e=>j(""+e)?V(""+e):new RegExp(`^${e}$`),E=(e,t,l={})=>(u,f)=>{if(f&&f.stylelint&&f.stylelint.customMessages&&f.stylelint.customMessages[i]&&delete f.stylelint.customMessages[i],!x.validateOptions(f,i,{actual:e,possible:c},{actual:t,possible:y,optional:!0}))return;Array.isArray(e)||(e=[e]);const p={...a,...t},{ignoreVariables:$,ignoreFunctions:E,ignoreKeywords:k,ignoreValues:P,message:S,disableFix:q,autoFixFunc:K,expandShorthand:R,recurseLonghand:L}=p,N=function(e,t,n){if("function"==typeof e)return e;if("string"==typeof e){let t;try{t=require.resolve(e)}catch(n){t=require.resolve(s.join(process.cwd(),e))}return require(t)}return!t&&n&&console.warn(`No \`autoFix\` function provided, consider using \`disableFix\` for "${i}"`),null}(K,q,l.fix),M=k?{}:null,z=P?{}:null;let Z;if($){const e=[];u.walkAtRules("value",t=>{const{params:n}=t,r=n.split(":")[0].trim();e.push(r)}),Z=new RegExp(`^-?(:?${e.join("|")})$`)}e.forEach(e=>{let t=e;function s(t,n,r,s=!1){const{value:a,prop:c}=t,y=r||a;let F=!1,j=!1,V=!1,K=!1;if($&&g($,e)&&(F=w.test(y)||Z.test(y)),E&&!F&&g(E,e)&&(j=v.test(y)),s&&(!$||$&&!F)&&(!E||E&&!j)&&!0!==((e,t)=>O.test(e)&&"transparent"===t||w.test(t)||v.test(t)||o(e,t))(n,r))return!1;if(k&&(!F||!j)){let t=M[e];if(!t){const n=h(k,e);n&&(t=new RegExp(`^${n.join("$|^")}$`),M[e]=t)}t&&(V=t.test(y))}if(P&&(!F||!j||!V)){let t=z[e];if(!t){const n=b(P,e);n&&(t=n.map(A),z[e]=t)}t&&(K=t.filter(e=>e.test(y)).length>0)}if(!(F||j||V||K)){const o=function(e,t){const{ignoreVariables:n,ignoreFunctions:r,ignoreKeywords:o,ignoreValues:s}=e,i=[];return n&&i.push("variable"),r&&i.push("function"),o&&h(o,t)&&i.push("keyword"),-1===i.indexOf("keyword")&&s&&b(s,t)&&i.push("keyword"),i}(p,e);if(l.fix&&!q&&N)try{const e=N(t,{validVar:F,validFunc:j,validKeyword:V,validValue:K,longhandProp:n,longhandValue:r},u,p);e&&(t.value=e)}catch(e){const{raws:n}=t,r=t.source.start;x.report({ruleName:i,result:f,node:t,line:r.line,column:r.column+c.length+n.between.length,message:m.failedToFix(e,y,c)})}else{const{raws:e}=t,n=t.source.start;x.report({ruleName:i,result:f,node:t,line:n.line,column:n.column+c.length+e.between.length,message:S?m.customExpected(d(o),y,c,S):m.expected(d(o),y,c)})}return!0}return!1}j(t)&&(t=V(t)),u.walkDecls(function(e){const{value:o,prop:i}=e;if(F.test(i))return;const l=R&&n.isShorthand(i);if(i===t||!l&&t instanceof RegExp&&t.test(i)){const t=r.space(o);if(t.length>1){let n=!1;t.forEach(t=>{n||(n=s(e,i,t))})}else s(e)}else if(l){const r=n.expand(i,o,L);let l=!1;Object.keys(r).forEach(n=>{const o=r[n];!l&&(n===t||t instanceof RegExp&&t.test(n))&&(l=s(e,n,o,!0))})}})})};E.primaryOptionArray=!0,E.ruleName=i,E.messages=m;const k=t.createPlugin(i,E);e.default=k,e.messages=m,e.ruleName=i});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("stylelint"),require("shortcss"),require("shortcss/lib/list"),require("css-values"),require("path")):"function"==typeof define&&define.amd?define(["exports","stylelint","shortcss","shortcss/lib/list","css-values","path"],t):t((e||self).stylelintDeclarationStrictValue={},e.stylelint,e.shortcss,e.list,e.cssValues,e.path)}(this,function(e,t,n,r,o,s){function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=/*#__PURE__*/i(t),a=/*#__PURE__*/i(n),u=/*#__PURE__*/i(r),c=/*#__PURE__*/i(o),f=/*#__PURE__*/i(s);const p="scale-unlimited/declaration-strict-value",d=(e,t)=>"object"==typeof e&&Object.hasOwnProperty.call(e,t),y={ignoreVariables:!0,ignoreFunctions:!0,ignoreKeywords:null,ignoreValues:null,expandShorthand:!1,recurseLonghand:!1,severity:"error",message:void 0,disableFix:!1,autoFixFunc:null};function g(e){const t=typeof e;return"string"===t||"number"===t}function h(e){return g(e)||Array.isArray(e)&&e.every(e=>g(e))}function b(e){return!("object"!=typeof e||!e)&&Object.keys(e).every(t=>h(e[t]))}function x(e){return!("object"!=typeof e||!e)&&Object.keys(e).every(t=>"boolean"==typeof e[t])}function m(e){if("object"!=typeof e)return!1;const t=Object.keys(y);return!(!Object.keys(e).every(e=>t.indexOf(e)>-1)||"ignoreVariables"in e&&"boolean"!=typeof e.ignoreVariables&&!x(e.ignoreVariables)&&null!==e.ignoreVariables||"ignoreFunctions"in e&&"boolean"!=typeof e.ignoreFunctions&&!x(e.ignoreFunctions)&&null!==e.ignoreFunctions||"severity"in e&&"string"!=typeof e.severity&&null!==e.severity||"ignoreKeywords"in e&&!h(e.ignoreKeywords)&&!b(e.ignoreKeywords)||"ignoreValues"in e&&!h(e.ignoreValues)&&!b(e.ignoreValues)||"expandShorthand"in e&&"boolean"!=typeof e.expandShorthand&&null!==e.expandShorthand||"recurseLonghand"in e&&"boolean"!=typeof e.recurseLonghand&&null!==e.recurseLonghand||"message"in e&&"string"!=typeof e.message&&null!==e.message||"disableFix"in e&&"boolean"!=typeof e.disableFix&&null!==e.disableFix||"autoFixFunc"in e&&"function"!=typeof e.autoFixFunc&&"string"!=typeof e.autoFixFunc&&null!==e.autoFixFunc)}function F(e){let t;if(Array.isArray(e)){const n=e.pop();t=e.length?`${e.join(", ")} or ${n}`:n}else t=e;return t}function v(e,t){return"boolean"==typeof e?e:"object"==typeof e&&e&&{}.hasOwnProperty.call(e,t)?e[t]:!!e}function $(e,t){if(!e)return null;let n=e;return d(n,t)?n=n[t]:d(n,"")&&(n=n[""]),Array.isArray(n)?n:[n]}function w(e,t){if(!e)return null;let n=e;return d(n,t)?n=n[t]:d(n,"")&&(n=n[""]),Array.isArray(n)?n:[n]}const{utils:V}=l.default,j=V.ruleMessages(p,{expected:function(e,t,n){return`Expected ${e} for "${t}" of "${n}"`},customExpected:function(e,t,n,r){return r.replace("${types}",e).replace("${value}",t).replace("${property}",n)},failedToFix:function(e,t,n){return e&&("string"==typeof e||e instanceof Error)?"string"==typeof e?e:e.message:`Property "${n}" with value "${t}" can't be autofixed`}}),A=/^(?:@|\$|--).+$/,E=/^-?(?:@.+|(?:(?:[a-zA-Z_-]|[^\x20-\x7F])+(?:[a-zA-Z0-9_-]|[^\x20-\x7F])*\.)?\$.+|var\(\s*--[\s\S]+\))$/,O=/^(?!var\(\s*--)[\s\S]+\([\s\S]*\)$/,k=/^\/(.*)\/([a-zA-Z]*)$/,S=/color/,q=e=>k.test(e),K=e=>{const[t,n]=(e=>e.match(k).slice(1))(e);return new RegExp(t,n)},R=e=>q(`${e}`)?K(`${e}`):new RegExp(`^${e}$`),L=(e,t,n={})=>(r,o)=>{if(o&&o.stylelint&&o.stylelint.customMessages&&o.stylelint.customMessages[p]&&delete o.stylelint.customMessages[p],!V.validateOptions(o,p,{actual:e,possible:h},{actual:t,possible:m,optional:!0}))return;Array.isArray(e)||(e=[e]);const s={...y,...t},{ignoreVariables:i,ignoreFunctions:l,ignoreKeywords:d,ignoreValues:g,message:b,disableFix:x,autoFixFunc:k,expandShorthand:L,recurseLonghand:N}=s,P=function(e,t,n){if("function"==typeof e)return e;if("string"==typeof e){let t;try{t=require.resolve(e)}catch(n){t=require.resolve(f.default.join(process.cwd(),e))}return require(t)}return!t&&n&&console.warn(`No \`autoFix\` function provided, consider using \`disableFix\` for "${p}"`),null}(k,x,n.fix),M=d?{}:null,T=g?{}:null;let z;if(i){const e=[];r.walkAtRules("value",t=>{const{params:n}=t,r=n.split(":")[0].trim();e.push(r)}),z=new RegExp(`^-?(:?${e.join("|")})$`)}e.forEach(e=>{let t=e;function f(t,a,u,f=!1){const{value:y,prop:h}=t,m=u||y;let A=!1,k=!1,q=!1,K=!1;if(i&&v(i,e)&&(A=E.test(m)||z.test(m)),l&&!A&&v(l,e)&&(k=O.test(m)),f&&(!i||i&&!A)&&(!l||l&&!k)&&!0!==((e,t)=>S.test(e)&&"transparent"===t||E.test(t)||O.test(t)||c.default(e,t))(a,u))return!1;if(d&&(!A||!k)){let t=M[e];if(!t){const n=$(d,e);n&&(t=new RegExp(`^${n.join("$|^")}$`),M[e]=t)}t&&(q=t.test(m))}if(g&&(!A||!k||!q)){let t=T[e];if(!t){const n=w(g,e);n&&(t=n.map(R),T[e]=t)}t&&(K=t.filter(e=>e.test(m)).length>0)}if(!(A||k||q||K)){const i=function(e,t){const{ignoreVariables:n,ignoreFunctions:r,ignoreKeywords:o,ignoreValues:s}=e,i=[];return n&&i.push("variable"),r&&i.push("function"),o&&$(o,t)&&i.push("keyword"),-1===i.indexOf("keyword")&&s&&w(s,t)&&i.push("keyword"),i}(s,e);if(n.fix&&!x&&P)try{const e=P(t,{validVar:A,validFunc:k,validKeyword:q,validValue:K,longhandProp:a,longhandValue:u},r,s);e&&(t.value=e)}catch(e){const{raws:n}=t,r=t.source.start;V.report({ruleName:p,result:o,node:t,line:r.line,column:r.column+h.length+n.between.length,message:j.failedToFix(e,m,h)})}else{const{raws:e}=t,n=t.source.start;V.report({ruleName:p,result:o,node:t,line:n.line,column:n.column+h.length+e.between.length,message:b?j.customExpected(F(i),m,h,b):j.expected(F(i),m,h)})}return!0}return!1}q(t)&&(t=K(t)),r.walkDecls(function(e){const{value:n,prop:r}=e;if(A.test(r))return;const o=L&&a.default.isShorthand(r);if(r===t||!o&&t instanceof RegExp&&t.test(r)){const t=u.default.space(n);if(t.length>1){let n=!1;t.forEach(t=>{n||(n=f(e,r,t))})}else f(e)}else if(o){const o=a.default.expand(r,n,N);let s=!1;Object.keys(o).forEach(n=>{const r=o[n];!s&&(n===t||t instanceof RegExp&&t.test(n))&&(s=f(e,n,r,!0))})}})})};L.primaryOptionArray=!0,L.ruleName=p,L.messages=j;const N=l.default.createPlugin(p,L);e.default=N,e.messages=j,e.ruleName=p});
//# sourceMappingURL=index.umd.js.map

@@ -1,2 +0,2 @@

[stylelint-declaration-strict-value - v1.9.2](../README.md) / [defaults](../modules/defaults.md) / DeclarationStrictValueResult
[stylelint-declaration-strict-value - v1.10.0](../README.md) / [defaults](../modules/defaults.md) / DeclarationStrictValueResult

@@ -30,3 +30,3 @@ # Interface: DeclarationStrictValueResult

[defaults.ts:85](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L85)
[defaults.ts:85](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L85)

@@ -43,3 +43,3 @@ ___

[defaults.ts:90](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L90)
[defaults.ts:90](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L90)

@@ -56,3 +56,3 @@ ___

[defaults.ts:70](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L70)
[defaults.ts:70](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L70)

@@ -69,3 +69,3 @@ ___

[defaults.ts:75](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L75)
[defaults.ts:75](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L75)

@@ -82,3 +82,3 @@ ___

[defaults.ts:80](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L80)
[defaults.ts:80](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L80)

@@ -95,2 +95,2 @@ ___

[defaults.ts:65](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L65)
[defaults.ts:65](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L65)

@@ -1,2 +0,2 @@

[stylelint-declaration-strict-value - v1.9.2](../README.md) / [defaults](../modules/defaults.md) / IgnoreValueHash
[stylelint-declaration-strict-value - v1.10.0](../README.md) / [defaults](../modules/defaults.md) / IgnoreValueHash

@@ -27,2 +27,2 @@ # Interface: IgnoreValueHash

[defaults.ts:38](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L38)
[defaults.ts:38](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L38)

@@ -1,2 +0,2 @@

[stylelint-declaration-strict-value - v1.9.2](../README.md) / [defaults](../modules/defaults.md) / IgnoreVariableOrFunctionHash
[stylelint-declaration-strict-value - v1.10.0](../README.md) / [defaults](../modules/defaults.md) / IgnoreVariableOrFunctionHash

@@ -3,0 +3,0 @@ # Interface: IgnoreVariableOrFunctionHash

@@ -1,2 +0,2 @@

[stylelint-declaration-strict-value - v1.9.2](../README.md) / [defaults](../modules/defaults.md) / SecondaryOptions
[stylelint-declaration-strict-value - v1.10.0](../README.md) / [defaults](../modules/defaults.md) / SecondaryOptions

@@ -36,3 +36,3 @@ # Interface: SecondaryOptions

[defaults.ts:183](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L183)
[defaults.ts:183](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L183)

@@ -51,3 +51,3 @@ ___

[defaults.ts:176](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L176)
[defaults.ts:176](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L176)

@@ -66,3 +66,3 @@ ___

[defaults.ts:148](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L148)
[defaults.ts:148](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L148)

@@ -81,3 +81,3 @@ ___

[defaults.ts:126](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L126)
[defaults.ts:126](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L126)

@@ -98,3 +98,3 @@ ___

[defaults.ts:134](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L134)
[defaults.ts:134](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L134)

@@ -113,3 +113,3 @@ ___

[defaults.ts:141](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L141)
[defaults.ts:141](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L141)

@@ -128,3 +128,3 @@ ___

[defaults.ts:119](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L119)
[defaults.ts:119](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L119)

@@ -143,3 +143,3 @@ ___

[defaults.ts:169](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L169)
[defaults.ts:169](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L169)

@@ -158,3 +158,3 @@ ___

[defaults.ts:155](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L155)
[defaults.ts:155](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L155)

@@ -173,2 +173,2 @@ ___

[defaults.ts:162](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L162)
[defaults.ts:162](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L162)

@@ -1,2 +0,2 @@

[stylelint-declaration-strict-value - v1.9.2](../README.md) / defaults
[stylelint-declaration-strict-value - v1.10.0](../README.md) / defaults

@@ -61,3 +61,3 @@ # Module: defaults

[defaults.ts:95](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L95)
[defaults.ts:95](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L95)

@@ -74,3 +74,3 @@ ___

[defaults.ts:108](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L108)
[defaults.ts:108](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L108)

@@ -87,3 +87,3 @@ ___

[defaults.ts:104](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L104)
[defaults.ts:104](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L104)

@@ -100,3 +100,3 @@ ___

[defaults.ts:27](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L27)
[defaults.ts:27](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L27)

@@ -113,3 +113,3 @@ ___

[defaults.ts:53](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L53)
[defaults.ts:53](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L53)

@@ -126,3 +126,3 @@ ___

[defaults.ts:31](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L31)
[defaults.ts:31](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L31)

@@ -139,3 +139,3 @@ ___

[defaults.ts:17](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L17)
[defaults.ts:17](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L17)

@@ -152,3 +152,3 @@ ___

[defaults.ts:23](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L23)
[defaults.ts:23](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L23)

@@ -163,3 +163,3 @@ ## Variables

[defaults.ts:186](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L186)
[defaults.ts:186](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L186)

@@ -176,3 +176,3 @@ ___

[defaults.ts:6](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L6)
[defaults.ts:6](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L6)

@@ -200,2 +200,2 @@ ## Functions

[defaults.ts:45](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/defaults.ts#L45)
[defaults.ts:45](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/defaults.ts#L45)

@@ -1,2 +0,2 @@

[stylelint-declaration-strict-value - v1.9.2](../README.md) / index
[stylelint-declaration-strict-value - v1.10.0](../README.md) / index

@@ -30,3 +30,3 @@ # Module: index

[index.ts:493](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/index.ts#L493)
[index.ts:493](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/index.ts#L493)

@@ -49,2 +49,2 @@ ___

[index.ts:28](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/index.ts#L28)
[index.ts:28](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/index.ts#L28)

@@ -1,2 +0,2 @@

[stylelint-declaration-strict-value - v1.9.2](../README.md) / lib/validation
[stylelint-declaration-strict-value - v1.10.0](../README.md) / lib/validation

@@ -48,3 +48,3 @@ # Module: lib/validation

[lib/validation.ts:241](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/lib/validation.ts#L241)
[lib/validation.ts:241](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/lib/validation.ts#L241)

@@ -77,3 +77,3 @@ ___

[lib/validation.ts:222](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/lib/validation.ts#L222)
[lib/validation.ts:222](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/lib/validation.ts#L222)

@@ -104,3 +104,3 @@ ___

[lib/validation.ts:195](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/lib/validation.ts#L195)
[lib/validation.ts:195](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/lib/validation.ts#L195)

@@ -133,3 +133,3 @@ ___

[lib/validation.ts:265](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/lib/validation.ts#L265)
[lib/validation.ts:265](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/lib/validation.ts#L265)

@@ -162,3 +162,3 @@ ___

[lib/validation.ts:410](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/lib/validation.ts#L410)
[lib/validation.ts:410](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/lib/validation.ts#L410)

@@ -191,3 +191,3 @@ ___

[lib/validation.ts:359](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/lib/validation.ts#L359)
[lib/validation.ts:359](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/lib/validation.ts#L359)

@@ -220,3 +220,3 @@ ___

[lib/validation.ts:385](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/lib/validation.ts#L385)
[lib/validation.ts:385](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/lib/validation.ts#L385)

@@ -249,3 +249,3 @@ ___

[lib/validation.ts:327](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/lib/validation.ts#L327)
[lib/validation.ts:327](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/lib/validation.ts#L327)

@@ -277,3 +277,3 @@ ___

[lib/validation.ts:286](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/lib/validation.ts#L286)
[lib/validation.ts:286](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/lib/validation.ts#L286)

@@ -304,3 +304,3 @@ ___

[lib/validation.ts:93](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/lib/validation.ts#L93)
[lib/validation.ts:93](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/lib/validation.ts#L93)

@@ -331,2 +331,2 @@ ___

[lib/validation.ts:39](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/b5739c9/src/lib/validation.ts#L39)
[lib/validation.ts:39](https://github.com/AndyOGo/stylelint-declaration-strict-value/blob/3633354/src/lib/validation.ts#L39)

@@ -1,4 +0,4 @@

stylelint-declaration-strict-value - v1.9.2
stylelint-declaration-strict-value - v1.10.0
# stylelint-declaration-strict-value - v1.9.2
# stylelint-declaration-strict-value - v1.10.0

@@ -5,0 +5,0 @@ ## Table of contents

@@ -1,10 +0,13 @@

/* eslint-disable @typescript-eslint/no-var-requires */
const { getTestRule } = require('jest-preset-stylelint');
const { lint } = require('stylelint');
import { getTestRule } from 'jest-preset-stylelint';
import { lint } from 'stylelint';
// eslint-disable-next-line import/extensions
import declarationStrictValuePlugin from './src/index.ts';
global.testRule = getTestRule({ plugins: ['./src/index.ts'] });
const plugins = [declarationStrictValuePlugin];
global.testOptions = testOptions;
global.testRule = getTestRule({ plugins });
function testOptions({ ruleName, config, reject }) {
global.testCustomAutoFixMessage = testCustomAutoFixMessage;
function testCustomAutoFixMessage({ ruleName, config, reject, fix }) {
// eslint-disable-next-line no-undef

@@ -17,7 +20,8 @@ describe(ruleName, () => {

const {
results: [{ invalidOptionWarnings }],
results: [{ warnings }],
} = await lint({
fix,
code,
config: {
plugins: ['./src/index.ts'],
plugins,
rules: {

@@ -27,9 +31,10 @@ [ruleName]: config,

},
quietDeprecationWarnings: true,
});
return { message, invalidOptionWarnings };
return { message, warnings };
})
);
rejections.forEach(({ message, invalidOptionWarnings }) => {
rejections.forEach(({ message, warnings }) => {
const expectedWarning = {

@@ -40,3 +45,3 @@ text: message,

// eslint-disable-next-line no-undef
expect(invalidOptionWarnings[0]).toMatchObject(expectedWarning);
expect(warnings[0]).toMatchObject(expectedWarning);
});

@@ -43,0 +48,0 @@ });

{
"name": "stylelint-declaration-strict-value",
"version": "1.9.2",
"version": "1.10.0",
"description": "Specify properties for which a variable, function, keyword or value must be used",
"source": "src/index.ts",
"exports": {
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"default": "./dist/index.mjs.js"
},
"main": "dist/index.js",

@@ -10,7 +15,10 @@ "module": "dist/index.esm.js",

"types": "dist/index.d.ts",
"engines": {
"node": ">=18.12.0"
},
"scripts": {
"build": "microbundle --tsconfig tsconfig.build.json --compress",
"release": "dotenv semantic-release",
"test": "jest",
"coverage": "nyc --reporter lcov --reporter text node test",
"test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" jest",
"coverage": "jest --config='./jest.coverage.config.js'",
"postcoverage": "dotenv codecov",

@@ -49,3 +57,3 @@ "eslint": "eslint 'src/**/*.[tj]s' 'test/**/*.[tj]s'",

"peerDependencies": {
"stylelint": ">=7 <=15"
"stylelint": ">=7 <=16"
},

@@ -73,2 +81,3 @@ "devDependencies": {

"codecov": "^3.8.1",
"cross-env": "^7.0.3",
"doctoc": "^2.0.0",

@@ -84,5 +93,5 @@ "dotenv-cli": "^4.0.0",

"jest": "^29.4.2",
"jest-preset-stylelint": "^6.0.0",
"jest-preset-stylelint": "^7.0.0",
"lint-staged": "^10.5.2",
"microbundle": "^0.12.0",
"microbundle": "^0.15.1",
"nyc": "^15.1.0",

@@ -92,3 +101,3 @@ "pinst": "^2.1.6",

"semantic-release": "^17.3.0",
"stylelint": "^15.0.0",
"stylelint": "^16.1.0",
"typedoc": "^0.22.7",

@@ -95,0 +104,0 @@ "typedoc-plugin-markdown": "^3.2.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc