persona-community-5/.pnpm-store/v3/files/b0/17fde0e8d8c6e1d2f03efe3f7454f1dbdeba67bc06ce62c2e8a7e26a255bafe425df6175bcc1a7d93319e1f5467605567b31df0a5a2b9402f37d2c709e19a5
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

23 lines
895 B
Plaintext

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PathExcludesPatterns = void 0;
const PathExcludesPatterns = ({ patterns }) => {
return {
PathItem(_path, { report, key, location }) {
if (!patterns)
throw new Error(`Parameter "patterns" is not provided for "path-excludes-patterns" rule`);
const pathKey = key.toString();
if (pathKey.startsWith('/')) {
const matches = patterns.filter((pattern) => pathKey.match(pattern));
for (const match of matches) {
report({
message: `path \`${pathKey}\` should not match regex pattern: \`${match}\``,
location: location.key(),
});
}
}
},
};
};
exports.PathExcludesPatterns = PathExcludesPatterns;