Place scalastyle_config.xml to the <root>/.idea or <root>/project directory.
scalastyle_config.xml
<root>/.idea
<root>/project
Full documentation is available on the Scalastyle website