Skip to content

Conversation

@ninjamuffin99
Copy link

Right now haxe-formatter is hard coded to only parse .hx files, unless you use the CLI's -e / --extension argument, in which case you will have to run it multiple times for each potential file type.

This PR adds a config option fileExtensions that allows a developer to configure which file types haxe-formatter will attempt to process.

Usecase is sometihng like OpenFL/Lime's .hxp file which is an alternative to their project.xml, which lets you setup project stuff in haxe code. Right now haxe-formatter doesn't allow any configuration to let itself know that this is a valid file type.

Another example is how Friday Night Funkin' separates it's hscript files, into .hxc files, which again are just haxe files, with a different extension.

This is my first time poking into this code base, so if there's something I missed with this PR, tests, different code style, let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant