postcss-bem-linter
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -10,7 +10,7 @@ 'use strict'; | ||
* @param {Object|String} [primaryOptions = 'suit'] | ||
* @param {RegExp} [primaryOptions.componentName] | ||
* @param {RegExp} [primaryOptions.utilitySelectors] | ||
* @param {RegExp|String} [primaryOptions.componentName] | ||
* @param {RegExp|String} [primaryOptions.utilitySelectors] | ||
* @param {Object|Function} [primaryOptions.componentSelectors] | ||
* @param {RegExp} [primaryOptions.ignoreSelectors] | ||
* @param {RegExp} [primaryOptions.ignoreCustomProperties] | ||
* @param {RegExp|String} [primaryOptions.ignoreSelectors] | ||
* @param {RegExp|String} [primaryOptions.ignoreCustomProperties] | ||
* @param {String} [primaryOptions.preset] - The same as passing a string for `primaryOptions` | ||
@@ -17,0 +17,0 @@ * @param {Object} [primaryOptions.presetOptions] - Options that are can be used by |
'use strict'; | ||
const toRegexp = require('./to-regexp'); | ||
/** | ||
* @param {String} filename | ||
* @param {Object} config | ||
* @param {String} config.componentNamePattern | ||
* @param {RegExp|String} config.componentNamePattern | ||
*/ | ||
@@ -11,7 +13,7 @@ module.exports = (filename, config) => { | ||
if (componentNamePattern.test(filename)) return filename; | ||
if (toRegexp(componentNamePattern).test(filename)) return filename; | ||
for (let i = 0; i < filename.length; i++) { | ||
const part = filename.slice(0, -i); | ||
if (componentNamePattern.test(part)) return part; | ||
if (toRegexp(componentNamePattern).test(part)) return part; | ||
} | ||
@@ -18,0 +20,0 @@ |
{ | ||
"name": "postcss-bem-linter", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "A BEM linter for postcss", | ||
@@ -53,3 +53,7 @@ "files": [ | ||
"test" | ||
] | ||
], | ||
"volta": { | ||
"node": "18.17.1", | ||
"yarn": "1.22.19" | ||
} | ||
} |
@@ -448,3 +448,3 @@ # postcss-bem-linter | ||
Install the dependencies. Requires [Yarn](https://yarnpkg.com/) | ||
Install dependencies. Requires [Yarn 1.x (Classic)](https://classic.yarnpkg.com/) | ||
@@ -451,0 +451,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37846
603