persona-community-5/.pnpm-store/v3/files/30/e5f80b2264db44db8653d9c0cebdf153b70726e0bed8b6bd3468bdcb2b6165f980211df8ffc47eb07b39fef111c50acde995b39e3e5de6e96363c096b28751
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
539 B
Plaintext

import type { Async3Rule } from '../../visitors';
import type { UserContext } from '../../walk';
import type { Channel } from '../../typings/asyncapi3';
export const NoChannelTrailingSlash: Async3Rule = () => {
return {
Channel(channel: Channel, { report, location }: UserContext) {
if ((channel.address as string).endsWith('/') && channel.address !== '/') {
report({
message: `\`${channel.address}\` should not have a trailing slash.`,
location: location.key(),
});
}
},
};
};