Sass has a NPM Package available to help with migration: sass-migrator.
I recently used it on a large codebase and while it didn't do the complete migration, it did a big part of it.
You have here the link to the npm package and you can install it with npm i --save-dev sass-migrator
.
Once you install it run sass-migrator <migration> <entrypoint.scss...>
on the CLI.
According to the documentation:
The Sass migrator automatically updates your Sass files to help you move on to the latest and greatest version of the language. Each of its commands migrates a single feature, to give you as much control as possible over what you update and when.
This option (abbreviated -d) tells the migrator to change not just the stylesheets that are explicitly passed on the command line, but also any stylesheets that they depend on using the @use rule, @forward rule, or @import rule.
This option (abbreviated -I) tells the migrator a load path where it should look for stylesheets. It can be passed multiple times to provide multiple load paths.