Unrecognized format error

Hi, I have been following the tutorial in this page https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/guides/5-custom-functions.md?srn=gh/stoplightio/spectral/docs/guides/5-custom-functions.md

So I have a ruleset.yaml file, a ‘functions’ dir and ‘abc.js’ inside it. I created a ‘mock.yaml’ file with

        message: hello

In this same directory I run spectral lint mock.yaml --ruleset ruleset.yaml but it gave me unrecognized-format error.

Maybe this is because I do not have a JSON schema, but I am not sure on how to set this up. I tried adding formats: ["json-schema-draft7"]
in the first line of my ruleset.yaml but it still give me the same error.

Any help would be very appreciated. Thank you so much!

Assuming the document you attempt to lint looks as follows

        message: hello

then, indeed, you’ll get the unrecognized format error.
You can disable the error via passing --ignore-unknown-format flag.
spectral lint mock.yaml --ruleset ruleset.yaml --ignore-unknown-format
Let me know how it went!