question-mark
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.

Extending shared config in JSON

See original GitHub issue

Prettier already support sharing-configurations. However it’s lacking support for extending shared configurations.

I’m thinking it could work like this

// .prettierrc.json
{
  "$schema": "http://json.schemastore.org/prettierrc",
  "extends": "@myorg/prettier-config", // shared config
  "printWidth": 120 // override
}

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:12
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
yzStrivecommented, Aug 24, 2020

need reopen vscode ,and then it works @fisker

3reactions
Zryrucommented, Mar 4, 2021

I think we decided not to implement this because Prettier has so few options it doesn’t really make sense to want to change one or two things about a config rather than just copy-pasting it.

Copy and paste is not an option when you want to maintain a huge organisation, if we decide for a change, instead of a npm install update, it would be “copy-pasting” over so many repositories which may not even be possible to get someone to go over ALL projects.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration File - Prettier
This means you can configure Prettier via (in order of precedence):. A "prettier" key in your package.json file. A .prettierrc file written in...
Read more >
How to extend cypress.json config to other configuration files?
Cypress plugin that adds "extends" support to the configuration file. This allows the config files to remain DRY and avoid duplicating data, ...
Read more >
Extending the Cypress Config File
Notice that we return merged base config plus config JSON (not the config argument passed into the plugins file). Cypress will automatically re- ......
Read more >
Shareable Config Presets - Renovate Docs
If you're using a renovate.json file to share your presets, ... To use a preset put it in an extends array within your...
Read more >
Configuration Files - ESLint - Pluggable JavaScript Linter
Here's an example JSON configuration file that uses the typescript-eslint parser to support TypeScript syntax: { "root": true, "extends": ...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found