Yes, although not recommended, but when talking about dev dependencies I'd say it's okay do to it. However, when you want to use that root level dependency in your packages you have to run it with:
yarn run -T
or yarn run --top-level
Discussion on whether it is bad or not:
https://www.reddit.com/r/javascript/comments/9t6yht/yarn_workspaces_why_is_adding_something_to_the/