Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Default formatter options

See original GitHub issue

Hello 👋

We are currently migrating from using ember-moment usage of moment-format to the ember-intl usage of format-date. Previously we could globally set our desired date format via config.

moment: {
      outputFormat: 'lll'

Is there any way to set a default format, or do we have to pass the option at each invocation of the {{format-date}}?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

chrisvdpcommented, Nov 5, 2020

Re-reading your comment again. I think the only suggestion I would make would be to make default a top-level object with time, date, etc within it to avoid a breaking change for anyone who currently has a format called default.

buschtoenscommented, Nov 5, 2020

Exactly. base options are overridden by named format options. Named format options are overridden by known options passed in the invocation.

defaults are only applied, when neither a named format nor any known options are passed in the invocation. The defaults are applied on top of the base options.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prettier - Code formatter - Visual Studio Marketplace
Default Formatter ​​ This setting can be set for all languages or by a specific language. If you want to disable Prettier on...
Read more >
How to make "Prettier" the default formatter in VS Code?
Update the vs code if necessary. · Make sure that you have prettier extension and enabled it. · Go to setting by clicking...
Read more >
How To Format Code with Prettier in Visual Studio Code
Prettier does a lot of things for you by default, but you can also customize the settings. Open the Settings menu. Then, search...
Read more >
How to Change the Default Format Settings in Eclipse - wikiHow
1. Open the Eclipse program. Click the Window option in the top tool bar and then click Preferences. 2. Using the left side...
Read more >
Automatically Format Code On File Save in Visual Studio ...
Usage · Then you will be asked to select the default formatter · Select prettier formatter from the options list · You're done....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found