persona-community-5/.pnpm-store/v3/files/73/2993b5a3214b318da64f46a2645b3bede8fbc1e97ddd0e012d2e681fddabe3fa3e1867efbdbcf2d5c69aafd79797cd38c2dbd97d4f221436c2a629f66a28cb
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

17 lines
507 B
Plaintext

import type { Oas3Rule } from '../../visitors';
export const NoServerExample: Oas3Rule = () => {
return {
Server(server, { report, location }) {
// eslint-disable-next-line no-useless-escape
const pattern = /^(.*[\/.])?(example\.com|localhost)([\/:?].*|$)/;
if (server.url && pattern.test(server.url)) {
report({
message: 'Server `url` should not point to example.com or localhost.',
location: location.child(['url']),
});
}
},
};
};