Skip to content

Conversation

@jpandersen87
Copy link

This PR updates happo.io to be able to load the default config filename with either a cjs or js extension.

  • replace DEFAULTS configFile with configFilename
  • remove default config argument from cli commands
  • simplify load function to not catch errors
  • update loadUserConfig function to load a provided config path with no catch
  • update loadUserConfig function to attempt to load the default config file for both js and cjs extensions (ignoring Cannot find error type if thrown), falling back to default config if none found
  • yarn version explicitly set (allows project to work as intended in yarn v2+ environments)

- replace DEFAULTS `configFile` with `configFilename`
- remove default config argument from cli commands
- simplify `load` function to not catch errors
- update `loadUserConfig` function to load a provided config path with no catch
- update `loadUserConfig` function to attempt to load the default config path for both `js` and `cjs` extensions (ignoring `Cannot find` error type if thrown), falling back to default config if none found
- yarn version explicitly set (allows project to work as intended in yarn v2+ environments)
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